linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] [media] drxd: allow functional gate control after, attach
@ 2012-12-15 23:11 Patrice Chotard
  2012-12-16 12:00 ` Antti Palosaari
  0 siblings, 1 reply; 2+ messages in thread
From: Patrice Chotard @ 2012-12-15 23:11 UTC (permalink / raw)
  To: Linux Media Mailing List, Devin Heitmueller, Antti Palosaari,
	Mauro Carvalho Chehab
  Cc: Frédéric

Previously, gate control didn't work until drxd_init()
execution. Migrate necessary set of commands in drxd_attach
to allow gate control to be used by tuner which are
accessible through i2c gate.

Reported-by: frederic.mantegazza@gbiloba.org
Signed-off-by: Patrice Chotard <patricechotard@free.fr>
---
 drivers/media/dvb-frontends/drxd_hard.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/dvb-frontends/drxd_hard.c
b/drivers/media/dvb-frontends/drxd_hard.c
index 6d98537..b2ab1e8 100644
--- a/drivers/media/dvb-frontends/drxd_hard.c
+++ b/drivers/media/dvb-frontends/drxd_hard.c
@@ -2978,6 +2978,10 @@ struct dvb_frontend *drxd_attach(const struct
drxd_config *config,
 	       sizeof(struct dvb_frontend_ops));
 	state->frontend.demodulator_priv = state;
 	ConfigureMPEGOutput(state, 0);
+	/* add few initialization to allow gate control */
+	CDRXD(state, state->config.IF ? state->config.IF : 36000000);
+	InitHI(state);
+
 	return &state->frontend;

 error:
-- 
1.7.10.4

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

* Re: [PATCH 1/2] [media] drxd: allow functional gate control after, attach
  2012-12-15 23:11 [PATCH 1/2] [media] drxd: allow functional gate control after, attach Patrice Chotard
@ 2012-12-16 12:00 ` Antti Palosaari
  0 siblings, 0 replies; 2+ messages in thread
From: Antti Palosaari @ 2012-12-16 12:00 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: Linux Media Mailing List, Devin Heitmueller,
	Mauro Carvalho Chehab, Frédéric

On 12/16/2012 01:11 AM, Patrice Chotard wrote:
> Previously, gate control didn't work until drxd_init()
> execution. Migrate necessary set of commands in drxd_attach
> to allow gate control to be used by tuner which are
> accessible through i2c gate.
>
> Reported-by: frederic.mantegazza@gbiloba.org
> Signed-off-by: Patrice Chotard <patricechotard@free.fr>
> ---
>   drivers/media/dvb-frontends/drxd_hard.c |    4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/media/dvb-frontends/drxd_hard.c
> b/drivers/media/dvb-frontends/drxd_hard.c
> index 6d98537..b2ab1e8 100644
> --- a/drivers/media/dvb-frontends/drxd_hard.c
> +++ b/drivers/media/dvb-frontends/drxd_hard.c
> @@ -2978,6 +2978,10 @@ struct dvb_frontend *drxd_attach(const struct
> drxd_config *config,
>   	       sizeof(struct dvb_frontend_ops));
>   	state->frontend.demodulator_priv = state;
>   	ConfigureMPEGOutput(state, 0);
> +	/* add few initialization to allow gate control */
> +	CDRXD(state, state->config.IF ? state->config.IF : 36000000);
> +	InitHI(state);
> +
>   	return &state->frontend;
>
>   error:
>

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



I looked it quite carefully. Comments could be nice, but as far as I 
understood:

ConfigureMPEGOutput(state, 0);
* that puts device sleeping, mostly configures MPEG TS IF (set pins to 
some state eg. Hi-Z to prevent current leakage, I can guess).

CDRXD(state, state->config.IF ? state->config.IF : 36000000);
* that just initializes state - no I/O

InitHI(state);
* there is comment: port/bridge/power down ctrl
* HI == host interface ?
* that is normally done during init(),
* only one command => not much I/O


Looks fine, thank you!

regards
Antti

-- 
http://palosaari.fi/

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

end of thread, other threads:[~2012-12-16 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-15 23:11 [PATCH 1/2] [media] drxd: allow functional gate control after, attach Patrice Chotard
2012-12-16 12:00 ` Antti Palosaari

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).