From: Antti Palosaari <crope@iki.fi>
To: Olli Salonen <olli.salonen@iki.fi>, olli@cabbala.net
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/6] si2168: add ts_mode setting and move to si2168_init
Date: Wed, 13 Aug 2014 02:21:36 +0300 [thread overview]
Message-ID: <53EAA180.2000602@iki.fi> (raw)
In-Reply-To: <1407787095-2167-1-git-send-email-olli.salonen@iki.fi>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Antti
On 08/11/2014 10:58 PM, Olli Salonen wrote:
> 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>
> ---
> 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 8f81d97..0eb0e4e 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -297,13 +297,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;
> @@ -465,6 +458,15 @@ static int si2168_init(struct dvb_frontend *fe)
> dev_info(&s->client->dev, "%s: found a '%s' in warm state\n",
> KBUILD_MODNAME, 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;
> @@ -633,6 +635,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/
prev parent reply other threads:[~2014-08-12 23:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 19:58 [PATCH 1/6] si2168: add ts_mode setting and move to si2168_init Olli Salonen
2014-08-11 19:58 ` [PATCH 2/6] em28xx: add ts mode setting for PCTV 461e Olli Salonen
2014-08-12 23:23 ` Antti Palosaari
2014-08-11 19:58 ` [PATCH 3/6] cxusb: add ts mode setting for TechnoTrend CT2-4400 Olli Salonen
2014-08-12 23:25 ` Antti Palosaari
2014-08-11 19:58 ` [PATCH 4/6] cx23885: add i2c client handling into dvb_unregister and state Olli Salonen
2014-08-12 23:27 ` Antti Palosaari
2014-08-11 19:58 ` [PATCH 5/6] cx23855: add frontend set voltage function into state Olli Salonen
2014-08-12 23:28 ` Antti Palosaari
2014-08-11 19:58 ` [PATCH 6/6] cx23855: add support for DVBSky T9580 DVB-C/T2/S2 tuner Olli Salonen
2014-08-12 23:21 ` Antti Palosaari [this message]
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=53EAA180.2000602@iki.fi \
--to=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=olli.salonen@iki.fi \
--cc=olli@cabbala.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.