Skip to contentSkip to conversation

drxd: allow functional gate control after, attach

PATCH In review Patrice Chotard 2 participants 2 messages Dec 15, 2012 – Dec 16, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drxd: allow functional gate control after, attach

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.

---
 drivers/media/dvb-frontends/drxd_hard.c |    4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/drivers/media/dvb-frontends/drxd_hard.c
index 6d98537..b2ab1e8 100644

drivers/media/dvb-frontends/drxd_hard.c +0 -0
@@ -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:

Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/2
#1 lore raw
Quoted 27 lines · Patrice Chotard

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.

---
  drivers/media/dvb-frontends/drxd_hard.c |    4 ++++
  1 file changed, 4 insertions(+)
drivers/media/dvb-frontends/drxd_hard.c +4 -0
index 6d98537..b2ab1e8 100644
@@ -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;
 
Quoted 2 lines

error:

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

Signature · 1 line
http://palosaari.fi/