forked from Minki/linux
[PATCH] v4l: 819: added autodetection code to tda8290 to avoid conflicts
- Added autodetection code to tda8290, to avoid conflicts with tda9887. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
e8b23c0238
commit
13dd38d081
@ -534,8 +534,8 @@ int tda8290_init(struct i2c_client *c)
|
|||||||
}
|
}
|
||||||
if (tuner_addrs == 0) {
|
if (tuner_addrs == 0) {
|
||||||
tuner_addrs = 0x61;
|
tuner_addrs = 0x61;
|
||||||
tuner_info ("could not clearly identify tuner address, defaulting to %x\n",
|
tuner_info ("Could not clearly identify tda8290/8275 tuner address.\n");
|
||||||
tuner_addrs);
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
tuner_addrs = tuner_addrs & 0xff;
|
tuner_addrs = tuner_addrs & 0xff;
|
||||||
tuner_info ("setting tuner address to %x\n", tuner_addrs);
|
tuner_info ("setting tuner address to %x\n", tuner_addrs);
|
||||||
|
@ -364,7 +364,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
|
|||||||
}
|
}
|
||||||
/* TEA5767 autodetection code - only for addr = 0xc0 */
|
/* TEA5767 autodetection code - only for addr = 0xc0 */
|
||||||
if (!no_autodetect) {
|
if (!no_autodetect) {
|
||||||
if (addr == 0x60) {
|
switch (addr) {
|
||||||
|
case 0x60:
|
||||||
if (tea5767_autodetection(&t->i2c) != EINVAL) {
|
if (tea5767_autodetection(&t->i2c) != EINVAL) {
|
||||||
t->type = TUNER_TEA5767;
|
t->type = TUNER_TEA5767;
|
||||||
t->mode_mask = T_RADIO;
|
t->mode_mask = T_RADIO;
|
||||||
@ -376,7 +377,17 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
|
|||||||
set_type(&t->i2c,t->type, t->mode_mask);
|
set_type(&t->i2c,t->type, t->mode_mask);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case 0x42:
|
||||||
|
case 0x43:
|
||||||
|
case 0x4a:
|
||||||
|
case 0x44:
|
||||||
|
if (tda8290_init(&t->i2c)<0) {
|
||||||
|
kfree(t);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initializes only the first adapter found */
|
/* Initializes only the first adapter found */
|
||||||
|
Loading…
Reference in New Issue
Block a user