linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] [media] cxd2880: modified structure declaration and optimized the driver
@ 2018-04-26  6:36 Yasunari.Takiguchi
  2018-04-26  6:39 ` [PATCH 1/3] [media] cxd2880-spi: Modified how to declare structure Yasunari.Takiguchi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yasunari.Takiguchi @ 2018-04-26  6:36 UTC (permalink / raw)
  To: linux-media, linux-kernel
  Cc: tbird20d, frowand.list, Yasunari.Takiguchi, Masayuki.Yamamoto,
	Hideki.Nozawa, Kota.Yonezawa, Toshihiko.Matsumoto,
	Satoshi.C.Watanabe

From: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>

Hi,

This is the update patch for patch Sony CXD2880 DVB-T2/T tuner + 
demodulator driver.

We modified how to declare structure and
optimized spi drive current and 
signal lock condition check part for BER/PER measure
to ensure BER/PER are stable.

The change history of this patch series is as below.

[Change list]
(1)The detail change items of each files are as below.
    [PATCH 1/3]
       drivers/media/spi/cxd2880-spi.c
         -modified how to declare spi_transfer structure

    [PATCH 2/3]
       drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
         -reduced the SPI output drive current
         -optimized signal lock condition check part for BER/PER measure
          to ensure BER/PER are stable

    [PATCH 3/3]
       drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h
          -updated version information

Thanks,
Takiguchi
---
 drivers/media/spi/cxd2880-spi.c                                     | 8 +++-----
 drivers/media/dvb-frontends/cxd2880/cxd2880_top.c                   | 14 ++++++++++++--
 drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h | 4 ++--

 3 files changed, 17 insertions(+), 9 deletions(-)

2.15.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] [media] cxd2880-spi: Modified how to declare structure
  2018-04-26  6:36 [PATCH 0/3] [media] cxd2880: modified structure declaration and optimized the driver Yasunari.Takiguchi
@ 2018-04-26  6:39 ` Yasunari.Takiguchi
  2018-04-26  6:41 ` [PATCH 2/3] [media] cxd2880:Optimized spi drive current and BER/PER set/get condition Yasunari.Takiguchi
  2018-04-26  6:42 ` [PATCH 3/3] [media] cxd2880: Changed version information Yasunari.Takiguchi
  2 siblings, 0 replies; 4+ messages in thread
From: Yasunari.Takiguchi @ 2018-04-26  6:39 UTC (permalink / raw)
  To: linux-media, linux-kernel
  Cc: tbird20d, frowand.list, Yasunari.Takiguchi, Masayuki.Yamamoto,
	Hideki.Nozawa, Kota.Yonezawa, Toshihiko.Matsumoto,
	Satoshi.C.Watanabe

From: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>

This is the modification of structure declaration for spi_transfer. 

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
---
[Change list]
   drivers/media/spi/cxd2880-spi.c
      -modified how to declare spi_transfer structure

 drivers/media/spi/cxd2880-spi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/spi/cxd2880-spi.c b/drivers/media/spi/cxd2880-spi.c
index 4df3bd312f48..754940f7e964 100644
--- a/drivers/media/spi/cxd2880-spi.c
+++ b/drivers/media/spi/cxd2880-spi.c
@@ -60,14 +60,13 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 static int cxd2880_write_spi(struct spi_device *spi, u8 *data, u32 size)
 {
 	struct spi_message msg;
-	struct spi_transfer tx;
+	struct spi_transfer tx = {};
 
 	if (!spi || !data) {
 		pr_err("invalid arg\n");
 		return -EINVAL;
 	}
 
-	memset(&tx, 0, sizeof(tx));
 	tx.tx_buf = data;
 	tx.len = size;
 
@@ -130,7 +129,7 @@ static int cxd2880_spi_read_ts(struct spi_device *spi,
 	int ret;
 	u8 data[3];
 	struct spi_message message;
-	struct spi_transfer transfer[2];
+	struct spi_transfer transfer[2] = {};
 
 	if (!spi || !read_data || !packet_num) {
 		pr_err("invalid arg\n");
@@ -146,7 +145,6 @@ static int cxd2880_spi_read_ts(struct spi_device *spi,
 	data[2] = packet_num;
 
 	spi_message_init(&message);
-	memset(transfer, 0, sizeof(transfer));
 
 	transfer[0].len = 3;
 	transfer[0].tx_buf = data;
@@ -383,7 +381,7 @@ static int cxd2880_start_feed(struct dvb_demux_feed *feed)
 			}
 		}
 		if (i == CXD2880_MAX_FILTER_SIZE) {
-			pr_err("PID filter is full. Assumed bug.\n");
+			pr_err("PID filter is full.\n");
 			return -EINVAL;
 		}
 		if (!dvb_spi->all_pid_feed_count)
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] [media] cxd2880:Optimized spi drive current and BER/PER set/get condition
  2018-04-26  6:36 [PATCH 0/3] [media] cxd2880: modified structure declaration and optimized the driver Yasunari.Takiguchi
  2018-04-26  6:39 ` [PATCH 1/3] [media] cxd2880-spi: Modified how to declare structure Yasunari.Takiguchi
@ 2018-04-26  6:41 ` Yasunari.Takiguchi
  2018-04-26  6:42 ` [PATCH 3/3] [media] cxd2880: Changed version information Yasunari.Takiguchi
  2 siblings, 0 replies; 4+ messages in thread
From: Yasunari.Takiguchi @ 2018-04-26  6:41 UTC (permalink / raw)
  To: linux-media, linux-kernel
  Cc: tbird20d, frowand.list, Yasunari.Takiguchi, Masayuki.Yamamoto,
	Hideki.Nozawa, Kota.Yonezawa, Toshihiko.Matsumoto,
	Satoshi.C.Watanabe

From: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>

This is the optimization for SPI drive current and 
signal lock condition check part for BER/PER measure
to ensure BER/PER are stable

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
---

[Change list]
   drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
      -reduced the SPI output drive current
      -optimized signal lock condition check part for BER/PER measure
       to ensure BER/PER are stable

 drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
index d474dc1b05da..bd9101e246d5 100644
--- a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
+++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c
@@ -520,6 +520,15 @@ static int cxd2880_init(struct dvb_frontend *fe)
 		pr_err("cxd2880 integ init failed %d\n", ret);
 		return ret;
 	}
+
+	ret = cxd2880_tnrdmd_set_cfg(&priv->tnrdmd,
+				     CXD2880_TNRDMD_CFG_TSPIN_CURRENT,
+				     0x00);
+	if (ret) {
+		mutex_unlock(priv->spi_mutex);
+		pr_err("cxd2880 set config failed %d\n", ret);
+		return ret;
+	}
 	mutex_unlock(priv->spi_mutex);
 
 	pr_debug("OK.\n");
@@ -1126,7 +1135,7 @@ static int cxd2880_get_stats(struct dvb_frontend *fe,
 	priv = fe->demodulator_priv;
 	c = &fe->dtv_property_cache;
 
-	if (!(status & FE_HAS_LOCK)) {
+	if (!(status & FE_HAS_LOCK) || !(status & FE_HAS_CARRIER)) {
 		c->pre_bit_error.len = 1;
 		c->pre_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
 		c->pre_bit_count.len = 1;
@@ -1345,7 +1354,8 @@ static int cxd2880_read_status(struct dvb_frontend *fe,
 
 	pr_debug("status %d\n", *status);
 
-	if (priv->s == 0 && (*status & FE_HAS_LOCK)) {
+	if (priv->s == 0 && (*status & FE_HAS_LOCK) &&
+	    (*status & FE_HAS_CARRIER)) {
 		mutex_lock(priv->spi_mutex);
 		if (c->delivery_system == SYS_DVBT) {
 			ret = cxd2880_set_ber_per_period_t(fe);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] [media] cxd2880: Changed version information
  2018-04-26  6:36 [PATCH 0/3] [media] cxd2880: modified structure declaration and optimized the driver Yasunari.Takiguchi
  2018-04-26  6:39 ` [PATCH 1/3] [media] cxd2880-spi: Modified how to declare structure Yasunari.Takiguchi
  2018-04-26  6:41 ` [PATCH 2/3] [media] cxd2880:Optimized spi drive current and BER/PER set/get condition Yasunari.Takiguchi
@ 2018-04-26  6:42 ` Yasunari.Takiguchi
  2 siblings, 0 replies; 4+ messages in thread
From: Yasunari.Takiguchi @ 2018-04-26  6:42 UTC (permalink / raw)
  To: linux-media, linux-kernel
  Cc: tbird20d, frowand.list, Yasunari.Takiguchi, Masayuki.Yamamoto,
	Hideki.Nozawa, Kota.Yonezawa, Toshihiko.Matsumoto,
	Satoshi.C.Watanabe

From: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>

This is the version update for this cxd2880 driver changing. 

Signed-off-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Masayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: Hideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: Kota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: Toshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: Satoshi Watanabe <Satoshi.C.Watanabe@sony.com>
---

[Change list]
    drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h
       -updated version information

 drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h
index fab55038b37b..c6d6c8dd16a1 100644
--- a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h
+++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_driver_version.h
@@ -7,6 +7,6 @@
  * Copyright (C) 2016, 2017, 2018 Sony Semiconductor Solutions Corporation
  */
 
-#define CXD2880_TNRDMD_DRIVER_VERSION "1.4.1 - 1.0.4"
+#define CXD2880_TNRDMD_DRIVER_VERSION "1.4.1 - 1.0.5"
 
-#define CXD2880_TNRDMD_DRIVER_RELEASE_DATE "2018-01-17"
+#define CXD2880_TNRDMD_DRIVER_RELEASE_DATE "2018-04-25"
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-26  6:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  6:36 [PATCH 0/3] [media] cxd2880: modified structure declaration and optimized the driver Yasunari.Takiguchi
2018-04-26  6:39 ` [PATCH 1/3] [media] cxd2880-spi: Modified how to declare structure Yasunari.Takiguchi
2018-04-26  6:41 ` [PATCH 2/3] [media] cxd2880:Optimized spi drive current and BER/PER set/get condition Yasunari.Takiguchi
2018-04-26  6:42 ` [PATCH 3/3] [media] cxd2880: Changed version information Yasunari.Takiguchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).