Commit 059a15df authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Mauro Carvalho Chehab

V4L/DVB (12781): tm6000: Start adding support for GPIO device-specific parameters

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c91cbd81
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <media/tuner.h> #include <media/tuner.h>
#include "tm6000.h" #include "tm6000.h"
#include "tm6000-regs.h"
#define TM6000_BOARD_UNKNOWN 0 #define TM6000_BOARD_UNKNOWN 0
#define TM5600_BOARD_GENERIC 1 #define TM5600_BOARD_GENERIC 1
...@@ -43,6 +44,7 @@ static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET }; ...@@ -43,6 +44,7 @@ static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET };
module_param_array(card, int, NULL, 0444); module_param_array(card, int, NULL, 0444);
struct tm6000_board { struct tm6000_board {
char *name; char *name;
...@@ -50,6 +52,8 @@ struct tm6000_board { ...@@ -50,6 +52,8 @@ struct tm6000_board {
int tuner_type; /* type of the tuner */ int tuner_type; /* type of the tuner */
int tuner_addr; /* tuner address */ int tuner_addr; /* tuner address */
int gpio_addr_tun_reset; /* GPIO used for reset tuner */
}; };
...@@ -59,6 +63,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -59,6 +63,7 @@ struct tm6000_board tm6000_boards[] = {
.caps = { .caps = {
.has_tuner = 1, .has_tuner = 1,
}, },
.gpio_addr_tun_reset = TM6000_GPIO_1,
}, },
[TM5600_BOARD_GENERIC] = { [TM5600_BOARD_GENERIC] = {
.name = "Generic tm5600 board", .name = "Generic tm5600 board",
...@@ -67,6 +72,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -67,6 +72,7 @@ struct tm6000_board tm6000_boards[] = {
.caps = { .caps = {
.has_tuner = 1, .has_tuner = 1,
}, },
.gpio_addr_tun_reset = TM6000_GPIO_1,
}, },
[TM6000_BOARD_GENERIC] = { [TM6000_BOARD_GENERIC] = {
.name = "Generic tm6000 board", .name = "Generic tm6000 board",
...@@ -76,6 +82,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -76,6 +82,7 @@ struct tm6000_board tm6000_boards[] = {
.has_tuner = 1, .has_tuner = 1,
.has_dvb = 1, .has_dvb = 1,
}, },
.gpio_addr_tun_reset = TM6000_GPIO_1,
}, },
[TM5600_BOARD_10MOONS_UT821] = { [TM5600_BOARD_10MOONS_UT821] = {
.name = "10Moons UT 821", .name = "10Moons UT 821",
...@@ -85,6 +92,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -85,6 +92,7 @@ struct tm6000_board tm6000_boards[] = {
.has_tuner = 1, .has_tuner = 1,
.has_eeprom = 1, .has_eeprom = 1,
}, },
.gpio_addr_tun_reset = TM6000_GPIO_1,
}, },
[TM6000_BOARD_10MOONS_UT330] = { [TM6000_BOARD_10MOONS_UT330] = {
.name = "10Moons UT 330", .name = "10Moons UT 330",
...@@ -96,6 +104,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -96,6 +104,7 @@ struct tm6000_board tm6000_boards[] = {
.has_zl10353 = 1, .has_zl10353 = 1,
.has_eeprom = 1, .has_eeprom = 1,
}, },
.gpio_addr_tun_reset = TM6000_GPIO_4,
}, },
[TM6000_BOARD_ADSTECH_DUAL_TV] = { [TM6000_BOARD_ADSTECH_DUAL_TV] = {
.name = "ADSTECH Dual TV USB", .name = "ADSTECH Dual TV USB",
...@@ -127,7 +136,7 @@ struct tm6000_board tm6000_boards[] = { ...@@ -127,7 +136,7 @@ struct tm6000_board tm6000_boards[] = {
struct usb_device_id tm6000_id_table [] = { struct usb_device_id tm6000_id_table [] = {
{ USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_10MOONS_UT821 }, { USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_10MOONS_UT821 },
{ USB_DEVICE(0x06e1, 0xf332), .driver_info = TM6000_BOARD_ADSTECH_DUAL_TV }, { 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 },
{ }, { },
}; };
......
...@@ -30,9 +30,13 @@ ...@@ -30,9 +30,13 @@
#define TM6000_VERSION KERNEL_VERSION(0, 0, 1) #define TM6000_VERSION KERNEL_VERSION(0, 0, 1)
/* Inputs */ /* Inputs */
#define TM6000_INPUT_TV 0
#define TM6000_INPUT_COMPOSITE 1 enum tm6000_itype {
#define TM6000_INPUT_SVIDEO 2 TM6000_INPUT_TV = 0,
TM6000_INPUT_COMPOSITE,
TM6000_INPUT_SVIDEO,
};
/* ------------------------------------------------------------------ /* ------------------------------------------------------------------
Basic structures Basic structures
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment