From: Antti Palosaari <crope@iki.fi>
To: linux-media@vger.kernel.org
Cc: Nibble Max <nibble.max@gmail.com>,
Olli Salonen <olli.salonen@iki.fi>,
Evgeny Plehov <EvgenyPlehov@ukr.net>,
Antti Palosaari <crope@iki.fi>
Subject: [GIT PULL FINAL 04/21] si2168: add ts_mode setting and move to si2168_init
Date: Fri, 22 Aug 2014 13:57:56 +0300 [thread overview]
Message-ID: <1408705093-5167-5-git-send-email-crope@iki.fi> (raw)
In-Reply-To: <1408705093-5167-1-git-send-email-crope@iki.fi>
From: Olli Salonen <olli.salonen@iki.fi>
Luis Alves submitted a TS mode patch to si2168 earlier, but the
patch was rejected due to a small issue. Here is a working version.
Also, setting of TS mode is moved from si2168_set_frontend to
si2168_init.
This patch adds the TS mode as a config option for the si2168 demod:
- ts_mode added to config struct.
- Possible (interesting) values are
* Parallel mode = 0x06
* Serial mode = 0x03
Currently the modules using this demod only use parallel mode.
Patches for these modules later in this patch series.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
---
drivers/media/dvb-frontends/si2168.c | 17 ++++++++++-------
drivers/media/dvb-frontends/si2168.h | 6 ++++++
drivers/media/dvb-frontends/si2168_priv.h | 1 +
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 59a4218..97614db 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -296,13 +296,6 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
if (ret)
goto err;
- memcpy(cmd.args, "\x14\x00\x01\x10\x16\x00", 6);
- cmd.wlen = 6;
- cmd.rlen = 4;
- ret = si2168_cmd_execute(s, &cmd);
- if (ret)
- goto err;
-
memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x18", 6);
cmd.wlen = 6;
cmd.rlen = 4;
@@ -464,6 +457,15 @@ static int si2168_init(struct dvb_frontend *fe)
dev_info(&s->client->dev, "found a '%s' in warm state\n",
si2168_ops.info.name);
+ /* set ts mode */
+ memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6);
+ cmd.args[4] |= s->ts_mode;
+ cmd.wlen = 6;
+ cmd.rlen = 4;
+ ret = si2168_cmd_execute(s, &cmd);
+ if (ret)
+ goto err;
+
s->active = true;
return 0;
@@ -630,6 +632,7 @@ static int si2168_probe(struct i2c_client *client,
*config->i2c_adapter = s->adapter;
*config->fe = &s->fe;
+ s->ts_mode = config->ts_mode;
i2c_set_clientdata(client, s);
diff --git a/drivers/media/dvb-frontends/si2168.h b/drivers/media/dvb-frontends/si2168.h
index 3c5b5ab..e086d67 100644
--- a/drivers/media/dvb-frontends/si2168.h
+++ b/drivers/media/dvb-frontends/si2168.h
@@ -34,6 +34,12 @@ struct si2168_config {
* returned by driver
*/
struct i2c_adapter **i2c_adapter;
+
+ /* TS mode */
+ u8 ts_mode;
};
+#define SI2168_TS_PARALLEL 0x06
+#define SI2168_TS_SERIAL 0x03
+
#endif
diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h
index ebbf502..0f83284 100644
--- a/drivers/media/dvb-frontends/si2168_priv.h
+++ b/drivers/media/dvb-frontends/si2168_priv.h
@@ -36,6 +36,7 @@ struct si2168 {
fe_delivery_system_t delivery_system;
fe_status_t fe_status;
bool active;
+ u8 ts_mode;
};
/* firmare command struct */
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-08-22 10:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 10:57 [GIT PULL FINAL 00/21] misc DTV stuff for 3.18 Antti Palosaari
2014-08-22 10:57 ` [GIT PULL FINAL 01/21] si2168: clean logging Antti Palosaari
2014-08-22 11:47 ` Mauro Carvalho Chehab
2014-08-22 12:13 ` Antti Palosaari
2014-08-22 12:28 ` Mauro Carvalho Chehab
2014-08-22 12:50 ` Antti Palosaari
2014-08-22 13:41 ` Mauro Carvalho Chehab
2014-08-22 10:57 ` [GIT PULL FINAL 02/21] si2157: " Antti Palosaari
2014-08-22 10:57 ` [GIT PULL FINAL 03/21] m88ds3103: implement set voltage and TS clock Antti Palosaari
2014-08-22 10:57 ` Antti Palosaari [this message]
2014-08-22 10:57 ` [GIT PULL FINAL 05/21] em28xx: add ts mode setting for PCTV 292e Antti Palosaari
2014-08-22 10:57 ` [GIT PULL FINAL 06/21] cxusb: add ts mode setting for TechnoTrend CT2-4400 Antti Palosaari
2014-08-22 10:57 ` [GIT PULL FINAL 07/21] sp2: Add I2C driver for CIMaX SP2 common interface module Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 08/21] cxusb: Add support for TechnoTrend TT-connect CT2-4650 CI Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 09/21] cxusb: Add read_mac_address for TT CT2-4400 and CT2-4650 Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 10/21] si2168: DVB-T2 PLP selection implemented Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 11/21] si2157: Add support for delivery system SYS_ATSC Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 12/21] dvb-usb-v2: remove dvb_usb_device NULL check Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 13/21] msi2500: remove unneeded local pointer on msi2500_isoc_init() Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 14/21] m88ts2022: fix 32bit overflow on filter calc Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 15/21] m88ts2022: fix coding style issues Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 16/21] m88ts2022: rename device state (priv => s) Antti Palosaari
2014-09-02 18:51 ` Mauro Carvalho Chehab
2014-09-03 2:26 ` Antti Palosaari
2014-09-03 10:38 ` Mauro Carvalho Chehab
2014-09-03 10:50 ` Antti Palosaari
2014-09-03 11:47 ` Mauro Carvalho Chehab
2014-08-22 10:58 ` [GIT PULL FINAL 17/21] m88ts2022: clean up logging Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 18/21] m88ts2022: convert to RegMap I2C API Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 19/21] m88ts2022: change parameter type of m88ts2022_cmd Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 20/21] m88ds3103: change .set_voltage() implementation Antti Palosaari
2014-08-22 10:58 ` [GIT PULL FINAL 21/21] m88ds3103: fix coding style issues Antti Palosaari
2014-08-22 11:08 ` [GIT PULL FINAL 00/21] misc DTV stuff for 3.18 Antti Palosaari
2014-09-02 18:59 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408705093-5167-5-git-send-email-crope@iki.fi \
--to=crope@iki.fi \
--cc=EvgenyPlehov@ukr.net \
--cc=linux-media@vger.kernel.org \
--cc=nibble.max@gmail.com \
--cc=olli.salonen@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox