diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-01-23 11:47:40 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-23 11:47:40 (GMT) |
commit | 94f9e56e2b32e9d0efa1321afc3fa164563b2c55 (patch) | |
tree | f8cf7f75026605673b116142acc5002da9ca3f3c /drivers/media/video/tvaudio.c | |
parent | 53a7240416adabb84e32334a9f118b7f05392ba2 (diff) | |
download | linux-94f9e56e2b32e9d0efa1321afc3fa164563b2c55.tar.xz |
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/video/tvaudio.c')
-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 6d03b9b0..c8e5ad0 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) chip_write(chip, TDA9840_SW, t); } +static int tda9840_checkit(struct CHIPSTATE *chip) +{ + int rc; + rc = chip_read(chip); + /* lower 5 bits should be 0 */ + return ((rc & 0x1f) == 0) ? 1 : 0; +} + /* ---------------------------------------------------------------------- */ /* audio chip descriptions - defines+functions for tda985x */ @@ -1264,6 +1272,7 @@ static struct CHIPDESC chiplist[] = { .addr_hi = I2C_TDA9840 >> 1, .registers = 5, + .checkit = tda9840_checkit, .getmode = tda9840_getmode, .setmode = tda9840_setmode, .checkmode = generic_checkmode, |