Skip to content

Commit

Permalink
V4L/DVB (3403): Add probe check for the tda9840.
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jan 23, 2006
1 parent 53a7240 commit 94f9e56
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/media/video/tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 94f9e56

Please sign in to comment.