V4L/DVB (3605): Add support for I2C_HW_B_CX2341X board adapter
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 25 Mar 2006 11:10:12 +0000 (08:10 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 2 Apr 2006 07:54:50 +0000 (04:54 -0300)
- Add missing class check to tveeprom_attach_adapter.
- Add CX2341X specific IR probe address list.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/tveeprom.c

index 95bacf435414ead307c6230cd65479f42a9369dc..fe76379ccef7c1b1e56dedd0398ceeb0f0ebc8e0 100644 (file)
@@ -400,6 +400,7 @@ static int ir_probe(struct i2c_adapter *adap)
        */
 
        static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
+       static const int probe_cx2341x[] = { 0x18, 0x7a, -1};
        static const int probe_saa7134[] = { 0x7a, 0x47, -1 };
        static const int probe_em28XX[] = { 0x30, 0x47, -1 };
        const int *probe = NULL;
@@ -411,6 +412,9 @@ static int ir_probe(struct i2c_adapter *adap)
        case I2C_HW_B_BT848:
                probe = probe_bttv;
                break;
+       case I2C_HW_B_CX2341X:
+               probe = probe_cx2341x;
+               break;
        case I2C_HW_SAA7134:
                probe = probe_saa7134;
                break;
index e0d2ff83fc917e8583a67bf5d8b45f783e027386..431c3e2f6c4274a81fe21c62ef232758c5220df5 100644 (file)
@@ -757,9 +757,9 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
 static int
 tveeprom_attach_adapter (struct i2c_adapter *adapter)
 {
-       if (adapter->id != I2C_HW_B_BT848)
-               return 0;
-       return i2c_probe(adapter, &addr_data, tveeprom_detect_client);
+       if (adapter->class & I2C_CLASS_TV_ANALOG)
+               return i2c_probe(adapter, &addr_data, tveeprom_detect_client);
+       return 0;
 }
 
 static int