diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-18 08:31:34 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-18 08:31:34 -0300 |
commit | 2d0abb67a8d568f7bfd5ae1814cf1f34757237da (patch) | |
tree | 5d5095b08d7c611e1dfc77a7af3391ca7bd86be0 | |
parent | 1bbb3db56cffd24a689fe904034f3a9ac65ff2d4 (diff) | |
download | mediapointer-dvb-s2-2d0abb67a8d568f7bfd5ae1814cf1f34757237da.tar.gz mediapointer-dvb-s2-2d0abb67a8d568f7bfd5ae1814cf1f34757237da.tar.bz2 |
renamed I2C_foo addresses to I2C_ADDR_foo
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
-rw-r--r-- | linux/drivers/media/video/bt8xx/bt832.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-cards.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/mxb.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/tda7432.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9840.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9840.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9875.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6420.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6420.h | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 60 | ||||
-rw-r--r-- | linux/include/media/i2c-addr.h | 58 |
11 files changed, 78 insertions, 78 deletions
diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c index b155bbe91..5838fc3d0 100644 --- a/linux/drivers/media/video/bt8xx/bt832.c +++ b/linux/drivers/media/video/bt8xx/bt832.c @@ -43,7 +43,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 }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index 47131de0d..e464bcdab 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -3070,7 +3070,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)) { @@ -3475,8 +3475,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); } @@ -3485,19 +3485,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) @@ -3508,7 +3508,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) diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index cedefda72..ac1c22ef7 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -200,13 +200,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; diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 37f482c07..5f6bb19d0 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -76,7 +76,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, }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index 9cc13ec8e..4677399db 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -44,7 +44,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; diff --git a/linux/drivers/media/video/tda9840.h b/linux/drivers/media/video/tda9840.h index 28021053b..7da8432cd 100644 --- a/linux/drivers/media/video/tda9840.h +++ b/linux/drivers/media/video/tda9840.h @@ -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 */ diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index 54386cacc..d5f6d4c5a 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -47,7 +47,7 @@ MODULE_LICENSE("GPL"); /* Addresses to scan */ static unsigned short normal_i2c[] = { - I2C_TDA9875 >> 1, + I2C_ADDR_TDA9875 >> 1, I2C_CLIENT_END }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index d22eac01b..27454cbb8 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -41,7 +41,7 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); do { if (debug) { printk("%s: %s()[%d]: ",__stringify(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; diff --git a/linux/drivers/media/video/tea6420.h b/linux/drivers/media/video/tea6420.h index ea664df15..5ef7c18e0 100644 --- a/linux/drivers/media/video/tea6420.h +++ b/linux/drivers/media/video/tea6420.h @@ -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 { diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index d371f7d4c..d204e1348 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -142,14 +142,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 }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; @@ -1288,8 +1288,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, @@ -1305,8 +1305,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, @@ -1327,8 +1327,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, @@ -1338,8 +1338,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, @@ -1351,8 +1351,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, @@ -1376,8 +1376,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, @@ -1398,8 +1398,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, @@ -1419,8 +1419,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, @@ -1432,8 +1432,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, @@ -1456,8 +1456,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, @@ -1475,8 +1475,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, diff --git a/linux/include/media/i2c-addr.h b/linux/include/media/i2c-addr.h index 7b0f5fe94..e7ff44a35 100644 --- a/linux/include/media/i2c-addr.h +++ b/linux/include/media/i2c-addr.h @@ -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 */ |