]> err.no Git - linux-2.6/commitdiff
V4L/DVB (3548): Renamed I2C_foo addresses to I2C_ADDR_foo
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 18 Mar 2006 11:31:34 +0000 (08:31 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 24 Mar 2006 19:26:51 +0000 (16:26 -0300)
I2C_foo were used for some i2c addresses. Bad, since those constants could
mean other i2c chip things.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/bt8xx/bt832.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/mxb.c
drivers/media/video/tda7432.c
drivers/media/video/tda9840.c
drivers/media/video/tda9840.h
drivers/media/video/tda9875.c
drivers/media/video/tea6420.c
drivers/media/video/tea6420.h
drivers/media/video/tvaudio.c
include/media/i2c-addr.h

index cc54b62f4601632ae5fee015a8b760fd524a7f05..f1309d94e96e8b0bf22e6287afdf87589c3d10b8 100644 (file)
@@ -39,7 +39,7 @@
 MODULE_LICENSE("GPL");
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { I2C_BT832_ALT1>>1, I2C_BT832_ALT2>>1,
+static unsigned short normal_i2c[] = { I2C_ADDR_BT832_ALT1>>1, I2C_ADDR_BT832_ALT2>>1,
                                       I2C_CLIENT_END };
 I2C_CLIENT_INSMOD;
 
index abfa6ad857a0b89f8e33b581a0d92bc721732bf7..e869bfbab3789608987cccd8892c8a3460d1e2fb 100644 (file)
@@ -3046,7 +3046,7 @@ static void miro_pinnacle_gpio(struct bttv *btv)
        gpio_inout(0xffffff, 0);
        gpio = gpio_read();
        id   = ((gpio>>10) & 63) -1;
-       msp  = bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx");
+       msp  = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
        if (id < 32) {
                btv->tuner_type = miro_tunermap[id];
                if (0 == (gpio & 0x20)) {
@@ -3442,8 +3442,8 @@ void __devinit bttv_init_card2(struct bttv *btv)
 
        if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
                /* detect Bt832 chip for quartzsight digital camera */
-               if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) ||
-                   (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0))
+               if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
+                   (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
                        boot_bt832(btv);
        }
 
@@ -3452,19 +3452,19 @@ void __devinit bttv_init_card2(struct bttv *btv)
 
        /* try to detect audio/fader chips */
        if (!bttv_tvcards[btv->c.type].no_msp34xx &&
-           bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0)
+           bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
                request_module("msp3400");
 
        if (bttv_tvcards[btv->c.type].msp34xx_alt &&
-           bttv_I2CRead(btv, I2C_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
+           bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
                request_module("msp3400");
 
        if (!bttv_tvcards[btv->c.type].no_tda9875 &&
-           bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0)
+           bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
                request_module("tda9875");
 
        if (!bttv_tvcards[btv->c.type].no_tda7432 &&
-           bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0)
+           bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
                request_module("tda7432");
 
        if (bttv_tvcards[btv->c.type].needs_tvaudio)
@@ -3475,7 +3475,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
        if (btv->tda9887_conf)
                tda9887 = 1;
        if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb &&
-           bttv_I2CRead(btv, I2C_TDA9887, "TDA9887") >=0)
+           bttv_I2CRead(btv, I2C_ADDR_TDA9887, "TDA9887") >=0)
                tda9887 = 1;
        /* Hybrid DVB card, DOES have a tda9887 */
        if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE)
index eb3b31867494b0ac0bf97ae08f94c7c84d48ae20..14ca251787d53e7826cd8693fb87e03dd688f63e 100644 (file)
@@ -198,13 +198,13 @@ static int mxb_probe(struct saa7146_dev* dev)
        /* loop through all i2c-devices on the bus and look who is there */
        list_for_each(item,&mxb->i2c_adapter.clients) {
                client = list_entry(item, struct i2c_client, list);
-               if( I2C_TEA6420_1 == client->addr )
+               if( I2C_ADDR_TEA6420_1 == client->addr )
                        mxb->tea6420_1 = client;
-               if( I2C_TEA6420_2 == client->addr )
+               if( I2C_ADDR_TEA6420_2 == client->addr )
                        mxb->tea6420_2 = client;
                if( I2C_TEA6415C_2 == client->addr )
                        mxb->tea6415c = client;
-               if( I2C_TDA9840 == client->addr )
+               if( I2C_ADDR_TDA9840 == client->addr )
                        mxb->tda9840 = client;
                if( I2C_SAA7111 == client->addr )
                        mxb->saa7111a = client;
index 600dacb873f4c8f25505e116d552825355bfb020..12b8981efd1344047e3637c6d2d208b80ec61be1 100644 (file)
@@ -71,7 +71,7 @@ module_param(maxvol, int, S_IRUGO | S_IWUSR);
 
 /* Address to scan (I2C address of this chip) */
 static unsigned short normal_i2c[] = {
-       I2C_TDA7432 >> 1,
+       I2C_ADDR_TDA7432 >> 1,
        I2C_CLIENT_END,
 };
 I2C_CLIENT_INSMOD;
index 0243700f58ae28579008a9309e68af434d857946..56e08e156cf0175e6e78b53d5cd1e053a2384011 100644 (file)
@@ -43,7 +43,7 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
 #define        TEST            0x04
 
 /* addresses to scan, found only at 0x42 (7-Bit) */
-static unsigned short normal_i2c[] = { I2C_TDA9840, I2C_CLIENT_END };
+static unsigned short normal_i2c[] = { I2C_ADDR_TDA9840, I2C_CLIENT_END };
 
 /* magic definition of all other variables and things */
 I2C_CLIENT_INSMOD;
index 28021053bd097f64d389503d108967ad337e43f0..7da8432cdca7378ea1c4879c0e7db27213753d75 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __INCLUDED_TDA9840__
 #define __INCLUDED_TDA9840__
 
-#define        I2C_TDA9840             0x42
+#define        I2C_ADDR_TDA9840                0x42
 
 #define TDA9840_DETECT         _IOR('v',1,int)
 /* return values for TDA9840_DETCT */
index 8a1e58e72c00beb5af5586e136f87a530f6c36d1..ccfd3b90ea9f1654d18bd353536445cae508a01b 100644 (file)
@@ -40,7 +40,7 @@ MODULE_LICENSE("GPL");
 
 /* Addresses to scan */
 static unsigned short normal_i2c[] =  {
-    I2C_TDA9875 >> 1,
+    I2C_ADDR_TDA9875 >> 1,
     I2C_CLIENT_END
 };
 I2C_CLIENT_INSMOD;
index ad7d2872cfbfb33c3b42e20d63ee74f24a4e0b6c..b4263b630712899b8589b0228f7f46fa9dbf8771 100644 (file)
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
             do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)
 
 /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */
-static unsigned short normal_i2c[] = { I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END };
+static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END };
 
 /* magic definition of all other variables and things */
 I2C_CLIENT_INSMOD;
index ea664df15ad4f8bdd8446f3bd7e5f6b7bf0b79d5..5ef7c18e0c5404e08d0a4a840f050b15db33c6e6 100644 (file)
@@ -2,8 +2,8 @@
 #define __INCLUDED_TEA6420__
 
 /* possible addresses */
-#define        I2C_TEA6420_1           0x4c
-#define        I2C_TEA6420_2           0x4d
+#define        I2C_ADDR_TEA6420_1              0x4c
+#define        I2C_ADDR_TEA6420_2              0x4d
 
 struct tea6420_multiplex
 {
index e68d5190cbbbbf90b59244658e50b193d2a5d854..4cc0497dcbde6aa65b548336186b5d14bf5cb729 100644 (file)
@@ -137,14 +137,14 @@ struct CHIPSTATE {
 /* i2c addresses                                                          */
 
 static unsigned short normal_i2c[] = {
-       I2C_TDA8425   >> 1,
-       I2C_TEA6300   >> 1,
-       I2C_TEA6420   >> 1,
-       I2C_TDA9840   >> 1,
-       I2C_TDA985x_L >> 1,
-       I2C_TDA985x_H >> 1,
-       I2C_TDA9874   >> 1,
-       I2C_PIC16C54  >> 1,
+       I2C_ADDR_TDA8425   >> 1,
+       I2C_ADDR_TEA6300   >> 1,
+       I2C_ADDR_TEA6420   >> 1,
+       I2C_ADDR_TDA9840   >> 1,
+       I2C_ADDR_TDA985x_L >> 1,
+       I2C_ADDR_TDA985x_H >> 1,
+       I2C_ADDR_TDA9874   >> 1,
+       I2C_ADDR_PIC16C54  >> 1,
        I2C_CLIENT_END };
 I2C_CLIENT_INSMOD;
 
@@ -1269,8 +1269,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tda9840",
                .id         = I2C_DRIVERID_TDA9840,
                .insmodopt  = &tda9840,
-               .addr_lo    = I2C_TDA9840 >> 1,
-               .addr_hi    = I2C_TDA9840 >> 1,
+               .addr_lo    = I2C_ADDR_TDA9840 >> 1,
+               .addr_hi    = I2C_ADDR_TDA9840 >> 1,
                .registers  = 5,
 
                .checkit    = tda9840_checkit,
@@ -1286,8 +1286,8 @@ static struct CHIPDESC chiplist[] = {
                .id         = I2C_DRIVERID_TDA9873,
                .checkit    = tda9873_checkit,
                .insmodopt  = &tda9873,
-               .addr_lo    = I2C_TDA985x_L >> 1,
-               .addr_hi    = I2C_TDA985x_H >> 1,
+               .addr_lo    = I2C_ADDR_TDA985x_L >> 1,
+               .addr_hi    = I2C_ADDR_TDA985x_H >> 1,
                .registers  = 3,
                .flags      = CHIP_HAS_INPUTSEL,
 
@@ -1308,8 +1308,8 @@ static struct CHIPDESC chiplist[] = {
                .checkit    = tda9874a_checkit,
                .initialize = tda9874a_initialize,
                .insmodopt  = &tda9874a,
-               .addr_lo    = I2C_TDA9874 >> 1,
-               .addr_hi    = I2C_TDA9874 >> 1,
+               .addr_lo    = I2C_ADDR_TDA9874 >> 1,
+               .addr_hi    = I2C_ADDR_TDA9874 >> 1,
 
                .getmode    = tda9874a_getmode,
                .setmode    = tda9874a_setmode,
@@ -1319,8 +1319,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tda9850",
                .id         = I2C_DRIVERID_TDA9850,
                .insmodopt  = &tda9850,
-               .addr_lo    = I2C_TDA985x_L >> 1,
-               .addr_hi    = I2C_TDA985x_H >> 1,
+               .addr_lo    = I2C_ADDR_TDA985x_L >> 1,
+               .addr_hi    = I2C_ADDR_TDA985x_H >> 1,
                .registers  = 11,
 
                .getmode    = tda985x_getmode,
@@ -1332,8 +1332,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tda9855",
                .id         = I2C_DRIVERID_TDA9855,
                .insmodopt  = &tda9855,
-               .addr_lo    = I2C_TDA985x_L >> 1,
-               .addr_hi    = I2C_TDA985x_H >> 1,
+               .addr_lo    = I2C_ADDR_TDA985x_L >> 1,
+               .addr_hi    = I2C_ADDR_TDA985x_H >> 1,
                .registers  = 11,
                .flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE,
 
@@ -1357,8 +1357,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tea6300",
                .id         = I2C_DRIVERID_TEA6300,
                .insmodopt  = &tea6300,
-               .addr_lo    = I2C_TEA6300 >> 1,
-               .addr_hi    = I2C_TEA6300 >> 1,
+               .addr_lo    = I2C_ADDR_TEA6300 >> 1,
+               .addr_hi    = I2C_ADDR_TEA6300 >> 1,
                .registers  = 6,
                .flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE | CHIP_HAS_INPUTSEL,
 
@@ -1379,8 +1379,8 @@ static struct CHIPDESC chiplist[] = {
                .id         = I2C_DRIVERID_TEA6300,
                .initialize = tea6320_initialize,
                .insmodopt  = &tea6320,
-               .addr_lo    = I2C_TEA6300 >> 1,
-               .addr_hi    = I2C_TEA6300 >> 1,
+               .addr_lo    = I2C_ADDR_TEA6300 >> 1,
+               .addr_hi    = I2C_ADDR_TEA6300 >> 1,
                .registers  = 8,
                .flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE | CHIP_HAS_INPUTSEL,
 
@@ -1400,8 +1400,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tea6420",
                .id         = I2C_DRIVERID_TEA6420,
                .insmodopt  = &tea6420,
-               .addr_lo    = I2C_TEA6420 >> 1,
-               .addr_hi    = I2C_TEA6420 >> 1,
+               .addr_lo    = I2C_ADDR_TEA6420 >> 1,
+               .addr_hi    = I2C_ADDR_TEA6420 >> 1,
                .registers  = 1,
                .flags      = CHIP_HAS_INPUTSEL,
 
@@ -1413,8 +1413,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "tda8425",
                .id         = I2C_DRIVERID_TDA8425,
                .insmodopt  = &tda8425,
-               .addr_lo    = I2C_TDA8425 >> 1,
-               .addr_hi    = I2C_TDA8425 >> 1,
+               .addr_lo    = I2C_ADDR_TDA8425 >> 1,
+               .addr_hi    = I2C_ADDR_TDA8425 >> 1,
                .registers  = 9,
                .flags      = CHIP_HAS_VOLUME | CHIP_HAS_BASSTREBLE | CHIP_HAS_INPUTSEL,
 
@@ -1437,8 +1437,8 @@ static struct CHIPDESC chiplist[] = {
                .name       = "pic16c54 (PV951)",
                .id         = I2C_DRIVERID_PIC16C54_PV9,
                .insmodopt  = &pic16c54,
-               .addr_lo    = I2C_PIC16C54 >> 1,
-               .addr_hi    = I2C_PIC16C54>> 1,
+               .addr_lo    = I2C_ADDR_PIC16C54 >> 1,
+               .addr_hi    = I2C_ADDR_PIC16C54>> 1,
                .registers  = 2,
                .flags      = CHIP_HAS_INPUTSEL,
 
@@ -1456,8 +1456,8 @@ static struct CHIPDESC chiplist[] = {
                /*.id         = I2C_DRIVERID_TA8874Z, */
                .checkit    = ta8874z_checkit,
                .insmodopt  = &ta8874z,
-               .addr_lo    = I2C_TDA9840 >> 1,
-               .addr_hi    = I2C_TDA9840 >> 1,
+               .addr_lo    = I2C_ADDR_TDA9840 >> 1,
+               .addr_hi    = I2C_ADDR_TDA9840 >> 1,
                .registers  = 2,
 
                .getmode    = ta8874z_getmode,
index 7b0f5fe94e0862829f66614ee2988f97d4cb4180..e7ff44a35ca00e7a5b07d900866f5b7006d2b24d 100644 (file)
@@ -1,44 +1,44 @@
 /*
- *  V4L I2C address list
+ *     V4L I2C address list
  *
  *
- *  Copyright (C) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>
+ *     Copyright (C) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>
  *     Based on a previous mapping by
- *             Ralph Metzler (rjkm@thp.uni-koeln.de)
- *             Gerd Knorr <kraxel@goldbach.in-berlin.de>
+ *     Ralph Metzler (rjkm@thp.uni-koeln.de)
+ *     Gerd Knorr <kraxel@goldbach.in-berlin.de>
  *
  */
 
 /* bttv address list */
-#define I2C_TSA5522        0xc2
-#define I2C_TDA7432        0x8a
-#define I2C_BT832_ALT1    0x88
-#define I2C_BT832_ALT2    0x8a // alternate setting
-#define I2C_TDA8425        0x82
-#define I2C_TDA9840        0x84
-#define I2C_TDA9850        0xb6 /* also used by 9855,9873 */
-#define I2C_TDA9874        0xb0 /* also used by 9875 */
-#define I2C_TDA9875        0xb0
-#define I2C_HAUPEE         0xa0
-#define I2C_STBEE          0xae
-#define I2C_VHX            0xc0
-#define I2C_MSP3400        0x80
-#define I2C_MSP3400_ALT    0x88
-#define I2C_TEA6300        0x80 /* also used by 6320 */
-#define I2C_DPL3518       0x84
-#define I2C_TDA9887       0x86
+#define I2C_ADDR_TSA5522       0xc2
+#define I2C_ADDR_TDA7432       0x8a
+#define I2C_ADDR_BT832_ALT1    0x88
+#define I2C_ADDR_BT832_ALT2    0x8a // alternate setting
+#define I2C_ADDR_TDA8425       0x82
+#define I2C_ADDR_TDA9840       0x84
+#define I2C_ADDR_TDA9850       0xb6 /* also used by 9855,9873 */
+#define I2C_ADDR_TDA9874       0xb0 /* also used by 9875 */
+#define I2C_ADDR_TDA9875       0xb0
+#define I2C_ADDR_HAUPEE                0xa0
+#define I2C_ADDR_STBEE         0xae
+#define I2C_ADDR_VHX           0xc0
+#define I2C_ADDR_MSP3400       0x80
+#define I2C_ADDR_MSP3400_ALT   0x88
+#define I2C_ADDR_TEA6300       0x80 /* also used by 6320 */
+#define I2C_ADDR_DPL3518       0x84
+#define I2C_ADDR_TDA9887       0x86
 
 /*
  * i2c bus addresses for the chips supported by tvaudio.c
  */
 
-#define I2C_TDA8425        0x82
-#define I2C_TDA9840        0x84 /* also used by TA8874Z */
-#define I2C_TDA985x_L      0xb4 /* also used by 9873 */
-#define I2C_TDA985x_H      0xb6
-#define I2C_TDA9874        0xb0 /* also used by 9875 */
+#define I2C_ADDR_TDA8425       0x82
+#define I2C_ADDR_TDA9840       0x84 /* also used by TA8874Z */
+#define I2C_ADDR_TDA985x_L     0xb4 /* also used by 9873 */
+#define I2C_ADDR_TDA985x_H     0xb6
+#define I2C_ADDR_TDA9874       0xb0 /* also used by 9875 */
 
-#define I2C_TEA6300        0x80 /* also used by 6320 */
-#define I2C_TEA6420       0x98
+#define I2C_ADDR_TEA6300       0x80 /* also used by 6320 */
+#define I2C_ADDR_TEA6420       0x98
 
-#define I2C_PIC16C54       0x96 /* PV951 */
+#define I2C_ADDR_PIC16C54      0x96 /* PV951 */