V4L/DVB (6180): tuner: don't probe 0x6b or 0x6f on cx88 boards
authorMichael Krufky <mkrufky@linuxtv.org>
Fri, 24 Aug 2007 04:13:07 +0000 (01:13 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:08:30 +0000 (22:08 -0300)
Ignore 0x6b and 0x6f on cx88 boards. Some FusionHDTV cards
have an ir receiver at 0x6b and an RTC at 0x6f which can
get corrupted if probed.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-core.c

index 2f74379f4e4b6a159be3b65e736ef9e03b1b9c90..2d4a3e38f278b5a650eecb9ed3f90f7b66124154 100644 (file)
@@ -661,6 +661,27 @@ static int tuner_probe(struct i2c_adapter *adap)
                normal_i2c[1] = I2C_CLIENT_END;
        }
 
+       /* HACK: Ignore 0x6b and 0x6f on cx88 boards.
+        * FusionHDTV5 RT Gold has an ir receiver at 0x6b
+        * and an RTC at 0x6f which can get corrupted if probed.
+        */
+       if (adap->id == I2C_HW_B_CX2388x) {
+               unsigned int i = 0;
+
+               while (i < I2C_CLIENT_MAX_OPTS && ignore[i] != I2C_CLIENT_END)
+                       i += 2;
+               if (i + 4 < I2C_CLIENT_MAX_OPTS) {
+                       ignore[i+0] = adap->nr;
+                       ignore[i+1] = 0x6b;
+                       ignore[i+2] = adap->nr;
+                       ignore[i+3] = 0x6f;
+                       ignore[i+4] = I2C_CLIENT_END;
+               } else
+                       printk(KERN_WARNING "tuner: "
+                              "too many options specified "
+                              "in i2c probe ignore list!\n");
+       }
+
        default_mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
 
        if (adap->class & I2C_CLASS_TV_ANALOG)