diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-01-23 06:47:40 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-23 14:06:24 -0500 |
commit | 2ecdd76e9bac4c0d2e934ab153793afafadaaa62 (patch) | |
tree | b5142ce2d36912acd26c5a296c7ddc6b794ac68e /drivers/media | |
parent | 9a610033977886d5d62e8b86a16956f30bdd30bd (diff) |
V4L/DVB (3403): Add probe check for the tda9840.
- Add probe check for the tda9840 to prevent misdetection of a Micronas
dpl3518a as a tda9840.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tvaudio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 6d03b9b05c6e..c8e5ad0e8185 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -390,6 +390,14 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode) | |||
390 | chip_write(chip, TDA9840_SW, t); | 390 | chip_write(chip, TDA9840_SW, t); |
391 | } | 391 | } |
392 | 392 | ||
393 | static int tda9840_checkit(struct CHIPSTATE *chip) | ||
394 | { | ||
395 | int rc; | ||
396 | rc = chip_read(chip); | ||
397 | /* lower 5 bits should be 0 */ | ||
398 | return ((rc & 0x1f) == 0) ? 1 : 0; | ||
399 | } | ||
400 | |||
393 | /* ---------------------------------------------------------------------- */ | 401 | /* ---------------------------------------------------------------------- */ |
394 | /* audio chip descriptions - defines+functions for tda985x */ | 402 | /* audio chip descriptions - defines+functions for tda985x */ |
395 | 403 | ||
@@ -1264,6 +1272,7 @@ static struct CHIPDESC chiplist[] = { | |||
1264 | .addr_hi = I2C_TDA9840 >> 1, | 1272 | .addr_hi = I2C_TDA9840 >> 1, |
1265 | .registers = 5, | 1273 | .registers = 5, |
1266 | 1274 | ||
1275 | .checkit = tda9840_checkit, | ||
1267 | .getmode = tda9840_getmode, | 1276 | .getmode = tda9840_getmode, |
1268 | .setmode = tda9840_setmode, | 1277 | .setmode = tda9840_setmode, |
1269 | .checkmode = generic_checkmode, | 1278 | .checkmode = generic_checkmode, |