diff mbox

[RFC] add i2c_gate_ctrl to mb86a20s.c

Message ID BLU0-SMTP1094E019B719AEBED47F0EED88E0@phx.gbl (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Manoel Pinheiro May 19, 2011, 6:49 p.m. UTC
The register 0xfe controls the i2c-bus from the mb86a20s to tuner.


Signed-off-by: Manoel Pinheiro <pinusdtv@hotmail.com>


 	struct mb86a20s_state *state = fe->demodulator_priv;
@@ -626,6 +637,7 @@ static struct dvb_frontend_ops mb86a20s_ops = {
 
 	.release = mb86a20s_release,
 
+	.i2c_gate_ctrl = mb86a20s_i2c_gate_ctrl,
 	.init = mb86a20s_initfe,
 	.set_frontend = mb86a20s_set_frontend,
 	.get_frontend = mb86a20s_get_frontend,


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/dvb/frontends/mb86a20s.c 
b/drivers/media/dvb/frontends/mb86a20s.c
index 0f867a5..f3c4013 100644
--- a/drivers/media/dvb/frontends/mb86a20s.c
+++ b/drivers/media/dvb/frontends/mb86a20s.c
@@ -370,6 +370,17 @@  static int mb86a20s_i2c_readreg(struct mb86a20s_state 
*state,
 	mb86a20s_i2c_writeregdata(state, state->config->demod_address, \
 	regdata, ARRAY_SIZE(regdata))
 
+static int mb86a20s_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
+{
+	struct mb86a20s_state *state = fe->demodulator_priv;
+
+	/* Enable/Disable I2C bus for tuner control */
+	if (enable)
+		return mb86a20s_writereg(state, 0xfe, 0);
+	else
+		return mb86a20s_writereg(state, 0xfe, 1);
+}
+
 static int mb86a20s_initfe(struct dvb_frontend *fe)
 {