V4L/DVB (11700): tda10048: Added option to block i2c gate control from other drivers.
authorSteven Toth <stoth@linuxtv.org>
Tue, 5 May 2009 22:30:27 +0000 (19:30 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 21:21:01 +0000 (18:21 -0300)
Currently, DVB-T is broken and this fixes it.

The PVRUSB2 has an odd I2C bus configuration where opening the i2c gate
on the digital and analog demod causes the tuner to fail. This needs
to be protected against for the PVRUSB2.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/tda10048.c
drivers/media/dvb/frontends/tda10048.h

index dfa3e2c..11be469 100644 (file)
@@ -689,6 +689,9 @@ static int tda10048_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
        struct tda10048_state *state = fe->demodulator_priv;
        dprintk(1, "%s(%d)\n", __func__, enable);
 
+       if (state->config->disable_gate_access)
+               return 0;
+
        if (enable)
                return tda10048_writereg(state, TDA10048_CONF_C4_1,
                        tda10048_readreg(state, TDA10048_CONF_C4_1) | 0x02);
index ab9cf5b..ee07b50 100644 (file)
@@ -57,6 +57,9 @@ struct tda10048_config {
 #define TDA10048_CLK_4000  4000
 #define TDA10048_CLK_16000 16000
        u16 clk_freq_khz;
+
+       /* Disable I2C gate access */
+       u8 disable_gate_access;
 };
 
 #if defined(CONFIG_DVB_TDA10048) || \