提交 94f9e56e 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

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: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 53a72404
...@@ -390,6 +390,14 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode) ...@@ -390,6 +390,14 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode)
chip_write(chip, TDA9840_SW, t); 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 */ /* audio chip descriptions - defines+functions for tda985x */
...@@ -1264,6 +1272,7 @@ static struct CHIPDESC chiplist[] = { ...@@ -1264,6 +1272,7 @@ static struct CHIPDESC chiplist[] = {
.addr_hi = I2C_TDA9840 >> 1, .addr_hi = I2C_TDA9840 >> 1,
.registers = 5, .registers = 5,
.checkit = tda9840_checkit,
.getmode = tda9840_getmode, .getmode = tda9840_getmode,
.setmode = tda9840_setmode, .setmode = tda9840_setmode,
.checkmode = generic_checkmode, .checkmode = generic_checkmode,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册