summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c33
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h5
2 files changed, 28 insertions, 10 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index cf3bb3c1b..fe14ecc05 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -107,7 +107,7 @@ static struct em28xx_reg_seq em2870_kworld_355u_digital[] = {
#endif
/* Callback for the most boards */
-static struct em28xx_reg_seq default_callback[] = {
+static struct em28xx_reg_seq default_tuner_gpio[] = {
{EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
{EM28XX_R08_GPIO, 0, EM_GPIO_4, 10},
{EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
@@ -473,7 +473,9 @@ struct em28xx_board em28xx_boards[] = {
.name = "Terratec Cinergy A Hybrid XS",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
+
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
.dvb_gpio = hauppauge_wintv_hvr_900_digital,
@@ -499,6 +501,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "KWorld PVRTV 300U",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
@@ -559,6 +562,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Terratec Cinergy T XS",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
.dvb_gpio = default_digital,
@@ -573,6 +577,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Kworld 350 U DVB-T",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
.dvb_gpio = default_digital,
@@ -605,6 +610,7 @@ struct em28xx_board em28xx_boards[] = {
.valid = EM28XX_BOARD_NOT_VALIDATED,
.has_msp34xx = 1,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -631,6 +637,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Hauppauge WinTV HVR 900",
.tda9887_conf = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.has_dvb = 1,
.dvb_gpio = hauppauge_wintv_hvr_900_digital,
@@ -656,6 +663,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Hauppauge WinTV HVR 900 (R2)",
.tda9887_conf = TDA9887_PRESENT,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
@@ -682,6 +690,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
.name = "Hauppauge WinTV HVR 950",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.has_dvb = 1,
.dvb_gpio = hauppauge_wintv_hvr_900_digital,
@@ -707,6 +716,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
.name = "Pinnacle PCTV HD Pro Stick",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.has_dvb = 1,
.dvb_gpio = hauppauge_wintv_hvr_900_digital,
@@ -732,6 +742,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
.name = "AMD ATI TV Wonder HD 600",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.has_dvb = 1,
.dvb_gpio = hauppauge_wintv_hvr_900_digital,
@@ -757,6 +768,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_TERRATEC_HYBRID_XS] = {
.name = "Terratec Hybrid XS",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
.has_dvb = 1,
.dvb_gpio = default_analog,
@@ -783,6 +795,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
.name = "Terratec Prodigy XS",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -973,6 +986,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "MSI DigiVox A/D",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -999,6 +1013,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "MSI DigiVox A/D II",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -1025,6 +1040,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "KWorld DVB-T 305U",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
@@ -1043,6 +1059,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2880_BOARD_KWORLD_DVB_310U] = {
.name = "KWorld DVB-T 310U",
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.has_dvb = 1,
.dvb_gpio = default_digital,
.mts_firmware = 1,
@@ -1068,6 +1085,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "DNT DA2 Hybrid",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -1094,6 +1112,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Pinnacle Hybrid Pro",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -1120,6 +1139,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Pinnacle Hybrid Pro (2)",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.mts_firmware = 1,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
@@ -1147,6 +1167,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Kworld VS-DVB-T 323UR",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
@@ -1166,6 +1187,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Terratec Hybrid XS (em2882)",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -1192,6 +1214,7 @@ struct em28xx_board em28xx_boards[] = {
.name = "Kworld PlusTV HD Hybrid 330",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_XC2028,
+ .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150,
#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb = 1,
@@ -1384,7 +1407,7 @@ int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
if (command != XC2028_TUNER_RESET)
return 0;
- rc = em28xx_gpio_set(dev, dev->tuner_gpio);
+ rc = em28xx_gpio_set(dev, dev->board.tuner_gpio);
return rc;
}
@@ -1521,11 +1544,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
break;
}
- /* Sets the default callback. Used only for certain tuners */
- if (!dev->tuner_gpio)
- dev->tuner_gpio = default_callback;
-
- em28xx_gpio_set(dev, dev->tuner_gpio);
+ em28xx_gpio_set(dev, dev->board.tuner_gpio);
em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
/* Unlock device */
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index be13c5d2b..667cb70cf 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -336,8 +336,10 @@ struct em28xx_board {
/* i2c flags */
unsigned int tda9887_conf;
+ /* GPIO sequences */
struct em28xx_reg_seq *dvb_gpio;
struct em28xx_reg_seq *suspend_gpio;
+ struct em28xx_reg_seq *tuner_gpio;
unsigned int is_em2800:1;
unsigned int has_msp34xx:1;
@@ -441,9 +443,6 @@ struct em28xx {
/* Some older em28xx chips needs a waiting time after writing */
unsigned int wait_after_write;
- /* GPIO sequences for tuner callbacks */
- struct em28xx_reg_seq *tuner_gpio;
-
struct list_head devlist;
u32 i2s_speed; /* I2S speed for audio digital stream */