diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-07-19 11:09:58 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-07-19 11:09:58 -0300 |
commit | fded0a08938fda19fa170c8cf5c4a92a163915bd (patch) | |
tree | e1b53829b58edd1a37c778ee1d0ca6bcd1f839f3 /linux/drivers | |
parent | dc6bcd9a295280818c9a86608ddf1a7e2e5c9d93 (diff) | |
download | mediapointer-dvb-s2-fded0a08938fda19fa170c8cf5c4a92a163915bd.tar.gz mediapointer-dvb-s2-fded0a08938fda19fa170c8cf5c4a92a163915bd.tar.bz2 |
tm6000: Start adding support for GPIO device-specific parameters
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/staging/tm6000/tm6000-cards.c | 25 | ||||
-rw-r--r-- | linux/drivers/staging/tm6000/tm6000.h | 10 |
2 files changed, 31 insertions, 4 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-cards.c b/linux/drivers/staging/tm6000/tm6000-cards.c index 4eafbdd77..1ec54f89a 100644 --- a/linux/drivers/staging/tm6000/tm6000-cards.c +++ b/linux/drivers/staging/tm6000/tm6000-cards.c @@ -29,6 +29,7 @@ #include <media/tuner.h> #include "tm6000.h" +#include "tm6000-regs.h" #define TM6000_BOARD_UNKNOWN 0 #define TM5600_BOARD_GENERIC 1 @@ -44,6 +45,18 @@ static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET }; module_param_array(card, int, NULL, 0444); +#if 0 +/* This will be needed sooner or later, to allow selecting video mux entries */ +#define MAX_TM6000_INPUT 3 + +struct tm6000_input { + enum tm6000_itype type; + u32 gpio_addr; + unsigned int gpio_val; + int vmux; /* Used to control registers 0xe3, 0xe8, 0xeb */ +}; +#endif + struct tm6000_board { char *name; @@ -51,6 +64,11 @@ 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 */ +#if 0 + struct tm6000_input input[MAX_TM6000_INPUT]; +#endif }; @@ -60,6 +78,7 @@ struct tm6000_board tm6000_boards[] = { .caps = { .has_tuner = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM5600_BOARD_GENERIC] = { .name = "Generic tm5600 board", @@ -68,6 +87,7 @@ struct tm6000_board tm6000_boards[] = { .caps = { .has_tuner = 1, }, + .gpio_addr_tun_reset = TM6000_GPIO_1, }, [TM6000_BOARD_GENERIC] = { .name = "Generic tm6000 board", @@ -77,6 +97,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", @@ -86,6 +107,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", @@ -97,6 +119,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", @@ -128,7 +151,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/linux/drivers/staging/tm6000/tm6000.h b/linux/drivers/staging/tm6000/tm6000.h index 7d3b0c3d7..97ba71482 100644 --- a/linux/drivers/staging/tm6000/tm6000.h +++ b/linux/drivers/staging/tm6000/tm6000.h @@ -33,9 +33,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 |