linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 4/6] cx23885: add i2c client handling into dvb_unregister and state
Date: Wed, 13 Aug 2014 02:27:31 +0300	[thread overview]
Message-ID: <53EAA2E3.1060206@iki.fi> (raw)
In-Reply-To: <1407787095-2167-4-git-send-email-olli.salonen@iki.fi>

Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

On 08/11/2014 10:58 PM, Olli Salonen wrote:
> Prepare cx23885 driver for handling I2C client that is needed for certain demodulators and tuners (for example Si2168 and Si2157). I2C client for tuner and demod stored in state and unregistering of the I2C devices added into dvb_unregister.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>   drivers/media/pci/cx23885/cx23885-dvb.c | 16 ++++++++++++++++
>   drivers/media/pci/cx23885/cx23885.h     |  3 +++
>   2 files changed, 19 insertions(+)
>
> diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
> index 968fecc..2608155 100644
> --- a/drivers/media/pci/cx23885/cx23885-dvb.c
> +++ b/drivers/media/pci/cx23885/cx23885-dvb.c
> @@ -1643,6 +1643,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port)
>   int cx23885_dvb_unregister(struct cx23885_tsport *port)
>   {
>   	struct videobuf_dvb_frontend *fe0;
> +	struct i2c_client *client;
>
>   	/* FIXME: in an error condition where the we have
>   	 * an expected number of frontends (attach problem)
> @@ -1651,6 +1652,21 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
>   	 * This comment only applies to future boards IF they
>   	 * implement MFE support.
>   	 */
> +
> +	/* remove I2C client for tuner */
> +	client = port->i2c_client_tuner;
> +	if (client) {
> +		module_put(client->dev.driver->owner);
> +		i2c_unregister_device(client);
> +	}
> +
> +	/* remove I2C client for demodulator */
> +	client = port->i2c_client_demod;
> +	if (client) {
> +		module_put(client->dev.driver->owner);
> +		i2c_unregister_device(client);
> +	}
> +
>   	fe0 = videobuf_dvb_get_frontend(&port->frontends, 1);
>   	if (fe0 && fe0->dvb.frontend)
>   		videobuf_dvb_unregister_bus(&port->frontends);
> diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
> index 0e086c0..1040b3e 100644
> --- a/drivers/media/pci/cx23885/cx23885.h
> +++ b/drivers/media/pci/cx23885/cx23885.h
> @@ -326,6 +326,9 @@ struct cx23885_tsport {
>   	/* Workaround for a temp dvb_frontend that the tuner can attached to */
>   	struct dvb_frontend analog_fe;
>
> +	struct i2c_client *i2c_client_demod;
> +	struct i2c_client *i2c_client_tuner;
> +
>   	int (*set_frontend)(struct dvb_frontend *fe);
>   };
>
>

-- 
http://palosaari.fi/

  reply	other threads:[~2014-08-12 23:27 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 [this message]
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 ` [PATCH 1/6] si2168: add ts_mode setting and move to si2168_init Antti Palosaari

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=53EAA2E3.1060206@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 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).