From: Mauro Carvalho Chehab Date: Thu, 19 Jul 2007 14:09:58 +0000 (-0300) Subject: V4L/DVB (12781): tm6000: Start adding support for GPIO device-specific parameters X-Git-Tag: v2.6.35-rc1~480^2~523 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c85cba3fe6d44b3955a4c2e19efb7bb8156cab5d;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git V4L/DVB (12781): tm6000: Start adding support for GPIO device-specific parameters Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 139fd6f..a10c9efd 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -28,6 +28,7 @@ #include #include "tm6000.h" +#include "tm6000-regs.h" #define TM6000_BOARD_UNKNOWN 0 #define TM5600_BOARD_GENERIC 1 @@ -43,6 +44,7 @@ static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET }; module_param_array(card, int, NULL, 0444); + struct tm6000_board { char *name; @@ -50,6 +52,8 @@ struct tm6000_board { int tuner_type; /* type of the tuner */ int tuner_addr; /* tuner address */ + + int gpio_addr_tun_reset; /* GPIO used for reset tuner */ }; @@ -59,6 +63,7 @@ struct tm6000_board tm6000_boards[] = { .caps = { .has_tuner = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM5600_BOARD_GENERIC] = { .name = "Generic tm5600 board", @@ -67,6 +72,7 @@ struct tm6000_board tm6000_boards[] = { .caps = { .has_tuner = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM6000_BOARD_GENERIC] = { .name = "Generic tm6000 board", @@ -76,6 +82,7 @@ struct tm6000_board tm6000_boards[] = { .has_tuner = 1, .has_dvb = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM5600_BOARD_10MOONS_UT821] = { .name = "10Moons UT 821", @@ -85,6 +92,7 @@ struct tm6000_board tm6000_boards[] = { .has_tuner = 1, .has_eeprom = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM6000_BOARD_10MOONS_UT330] = { .name = "10Moons UT 330", @@ -96,6 +104,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 1, .has_eeprom = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_4, }, [TM6000_BOARD_ADSTECH_DUAL_TV] = { .name = "ADSTECH Dual TV USB", @@ -127,7 +136,7 @@ struct tm6000_board tm6000_boards[] = { struct usb_device_id tm6000_id_table [] = { { USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_10MOONS_UT821 }, { USB_DEVICE(0x06e1, 0xf332), .driver_info = TM6000_BOARD_ADSTECH_DUAL_TV }, - { USB_DEVICE(0x14aa, 0x620), .driver_info = TM6000_BOARD_FREECOM_AND_SIMILAR }, + { USB_DEVICE(0x14aa, 0x0620), .driver_info = TM6000_BOARD_FREECOM_AND_SIMILAR }, { }, }; diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h index c255ada..e8ae81d 100644 --- a/drivers/staging/tm6000/tm6000.h +++ b/drivers/staging/tm6000/tm6000.h @@ -30,9 +30,13 @@ #define TM6000_VERSION KERNEL_VERSION(0, 0, 1) /* Inputs */ -#define TM6000_INPUT_TV 0 -#define TM6000_INPUT_COMPOSITE 1 -#define TM6000_INPUT_SVIDEO 2 + +enum tm6000_itype { + TM6000_INPUT_TV = 0, + TM6000_INPUT_COMPOSITE, + TM6000_INPUT_SVIDEO, +}; + /* ------------------------------------------------------------------ Basic structures