V4L/DVB (12781): tm6000: Start adding support for GPIO device-specific parameters
authorMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 19 Jul 2007 14:09:58 +0000 (11:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:39:32 +0000 (00:39 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-cards.c
drivers/staging/tm6000/tm6000.h

index 139fd6f352af3c8a3af0eec186f62e2aac73800b..a10c9efd633ed912361a8f6a124f291c03da9d7e 100644 (file)
@@ -28,6 +28,7 @@
 #include <media/tuner.h>
 
 #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 },
        { },
 };
 
index c255adac98e5e4add4e15d10cc433219c801a57c..e8ae81d236b984d61f74c1fdcfa1f42e38e952f1 100644 (file)
 #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