All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Olli Salonen <olli.salonen@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 03/12] si2157: support selection of IF interface
Date: Fri, 24 Apr 2015 00:52:12 -0300	[thread overview]
Message-ID: <20150424005212.6bad1f32@recife.lan> (raw)
In-Reply-To: <1429823471-21835-3-git-send-email-olli.salonen@iki.fi>

Hi Olli,

Em Fri, 24 Apr 2015 00:11:02 +0300
Olli Salonen <olli.salonen@iki.fi> escreveu:

> The chips supported by the si2157 driver have two IF outputs (either
> pins 12+13 or pins 9+11). Instead of hardcoding the output to be used
> add an option to choose which output shall be used.
> 
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>  drivers/media/tuners/si2157.c      | 4 +++-
>  drivers/media/tuners/si2157.h      | 6 ++++++
>  drivers/media/tuners/si2157_priv.h | 1 +
>  3 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
> index d74ae26..cdaf687 100644
> --- a/drivers/media/tuners/si2157.c
> +++ b/drivers/media/tuners/si2157.c
> @@ -298,7 +298,8 @@ static int si2157_set_params(struct dvb_frontend *fe)
>  	if (dev->chiptype == SI2157_CHIPTYPE_SI2146)
>  		memcpy(cmd.args, "\x14\x00\x02\x07\x00\x01", 6);
>  	else
> -		memcpy(cmd.args, "\x14\x00\x02\x07\x01\x00", 6);
> +		memcpy(cmd.args, "\x14\x00\x02\x07\x00\x00", 6);

As you're changing the default, you should fold the patches that use
si2157_config.if_port = 1 on this patch (e.g. patches 4-10), as we don't
want to break git bisectability.

Regards,
Mauro



> +	cmd.args[4] = dev->if_port;
>  	cmd.wlen = 6;
>  	cmd.rlen = 4;
>  	ret = si2157_cmd_execute(client, &cmd);
> @@ -378,6 +379,7 @@ static int si2157_probe(struct i2c_client *client,
>  	i2c_set_clientdata(client, dev);
>  	dev->fe = cfg->fe;
>  	dev->inversion = cfg->inversion;
> +	dev->if_port = cfg->if_port;
>  	dev->fw_loaded = false;
>  	dev->chiptype = (u8)id->driver_data;
>  	dev->if_frequency = 5000000; /* default value of property 0x0706 */
> diff --git a/drivers/media/tuners/si2157.h b/drivers/media/tuners/si2157.h
> index a564c4a..4db97ab 100644
> --- a/drivers/media/tuners/si2157.h
> +++ b/drivers/media/tuners/si2157.h
> @@ -34,6 +34,12 @@ struct si2157_config {
>  	 * Spectral Inversion
>  	 */
>  	bool inversion;
> +
> +	/*
> +	 * Port selection
> +	 * Select the RF interface to use (pins 9+11 or 12+13)
> +	 */
> +	u8 if_port;
>  };
>  
>  #endif
> diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
> index cd8fa5b..71a5f8c 100644
> --- a/drivers/media/tuners/si2157_priv.h
> +++ b/drivers/media/tuners/si2157_priv.h
> @@ -28,6 +28,7 @@ struct si2157_dev {
>  	bool fw_loaded;
>  	bool inversion;
>  	u8 chiptype;
> +	u8 if_port;
>  	u32 if_frequency;
>  };
>  

  reply	other threads:[~2015-04-24  3:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 21:11 [PATCH 01/12] si2168: add support for gapped clock Olli Salonen
2015-04-23 21:11 ` [PATCH 02/12] dvbsky: use si2168 config option ts_clock_gapped Olli Salonen
2015-04-24  6:31   ` Tycho Lürsen
2015-04-24  6:57   ` Tycho Lürsen
     [not found]     ` <CAAZRmGzPZaJoMtHXYuFo081xbG3Eb_1+WwePziKfp6R5kREGDw@mail.gmail.com>
2015-04-24  7:03       ` Olli Salonen
2015-04-24 13:16         ` Steven Toth
2015-04-24 14:01           ` Tycho Lürsen
2015-04-24 14:10             ` Steven Toth
2015-04-27 11:51           ` Olli Salonen
2015-04-23 21:11 ` [PATCH 03/12] si2157: support selection of IF interface Olli Salonen
2015-04-24  3:52   ` Mauro Carvalho Chehab [this message]
2015-04-23 21:11 ` [PATCH 04/12] cx23885: specify if_port for si2157 devices Olli Salonen
2015-04-23 21:11 ` [PATCH 05/12] smipcie: " Olli Salonen
2015-04-23 21:11 ` [PATCH 06/12] cx231xx: " Olli Salonen
2015-04-23 21:11 ` [PATCH 07/12] af9035: " Olli Salonen
2015-04-23 21:11 ` [PATCH 08/12] dvbsky: " Olli Salonen
2015-04-23 21:11 ` [PATCH 09/12] cxusb: " Olli Salonen
2015-04-23 21:11 ` [PATCH 10/12] em28xx: " Olli Salonen
2015-04-23 21:11 ` [PATCH 11/12] rtl28xxu: add I2C read without write Olli Salonen
2015-04-23 21:11 ` [PATCH 12/12] rtl2832: add support for GoTView MasterHD 3 USB tuner Olli Salonen
2015-04-23 22:07   ` Benjamin Larsson

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=20150424005212.6bad1f32@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=linux-media@vger.kernel.org \
    --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 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.