aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-09 00:37:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:22 -0500
commit13dd38d0814f36fce3a7ec9cb29a5ce6b0fc2522 (patch)
treedaa5f528843d4d2170aa97c6363545a424966c0e /drivers/media/video
parente8b23c0238887e1987d82ec0014a7a1fe010e724 (diff)
[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>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/tda8290.c4
-rw-r--r--drivers/media/video/tuner-core.c13
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index fa9b4b898f68..abad3d5b04f6 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -534,8 +534,8 @@ int tda8290_init(struct i2c_client *c)
534 } 534 }
535 if (tuner_addrs == 0) { 535 if (tuner_addrs == 0) {
536 tuner_addrs = 0x61; 536 tuner_addrs = 0x61;
537 tuner_info ("could not clearly identify tuner address, defaulting to %x\n", 537 tuner_info ("Could not clearly identify tda8290/8275 tuner address.\n");
538 tuner_addrs); 538 return -1;
539 } else { 539 } else {
540 tuner_addrs = tuner_addrs & 0xff; 540 tuner_addrs = tuner_addrs & 0xff;
541 tuner_info ("setting tuner address to %x\n", tuner_addrs); 541 tuner_info ("setting tuner address to %x\n", tuner_addrs);
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index b9f1acf30caf..d4786b331467 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -364,7 +364,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
364 } 364 }
365 /* TEA5767 autodetection code - only for addr = 0xc0 */ 365 /* TEA5767 autodetection code - only for addr = 0xc0 */
366 if (!no_autodetect) { 366 if (!no_autodetect) {
367 if (addr == 0x60) { 367 switch (addr) {
368 case 0x60:
368 if (tea5767_autodetection(&t->i2c) != EINVAL) { 369 if (tea5767_autodetection(&t->i2c) != EINVAL) {
369 t->type = TUNER_TEA5767; 370 t->type = TUNER_TEA5767;
370 t->mode_mask = T_RADIO; 371 t->mode_mask = T_RADIO;
@@ -376,7 +377,17 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
376 set_type(&t->i2c,t->type, t->mode_mask); 377 set_type(&t->i2c,t->type, t->mode_mask);
377 return 0; 378 return 0;
378 } 379 }
380 case 0x42:
381 case 0x43:
382 case 0x4a:
383 case 0x44:
384 if (tda8290_init(&t->i2c)<0) {
385 kfree(t);
386 return 0;
387 }
388
379 } 389 }
390
380 } 391 }
381 392
382 /* Initializes only the first adapter found */ 393 /* Initializes only the first adapter found */