@@ -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)
{
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,
The register 0xfe controls the i2c-bus from the mb86a20s to tuner. Signed-off-by: Manoel Pinheiro <pinusdtv@hotmail.com> --- drivers/media/dvb/frontends/mb86a20s.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)