lkml.org 
[lkml]   [2006]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 006/141] V4L/DVB (3403): Add probe check for the tda9840.
    Date
    From: Hans Verkuil <hverkuil@xs4all.nl>
    Date: 1138016860 -0200

    - 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>
    ---

    diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
    diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
    index 6d03b9b..c8e5ad0 100644
    --- a/drivers/media/video/tvaudio.c
    +++ b/drivers/media/video/tvaudio.c
    @@ -390,6 +390,14 @@ static void tda9840_setmode(struct CHIPS
    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,
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-20 17:03    [W:4.312 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site