Commit c85cba3f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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

parent 4f44dcec
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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 },
	{ },
};

+7 −3
Original line number Diff line number Diff line
@@ -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