summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/siano/sms-cards.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-12-16 02:56:08 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:00 -0300
commitd54093afb1eaa34ff0026cfcf72f471b9bf77e8a (patch)
tree1a2722b37e0448cac754c2c7c009f0ff48a6648e /drivers/media/dvb/siano/sms-cards.c
parentb72857dd457b96de653b19b3c40394dac6285819 (diff)
downloadlinux-3.10-d54093afb1eaa34ff0026cfcf72f471b9bf77e8a.tar.gz
linux-3.10-d54093afb1eaa34ff0026cfcf72f471b9bf77e8a.tar.bz2
linux-3.10-d54093afb1eaa34ff0026cfcf72f471b9bf77e8a.zip
V4L/DVB (10746): sms1xxx: enable rf switch on Hauppauge Tiger devices
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/siano/sms-cards.c')
-rw-r--r--drivers/media/dvb/siano/sms-cards.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
index 79f5715c01f..6c8faeb7484 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -117,6 +117,7 @@ static struct sms_board sms_boards[] = {
.type = SMS_NOVA_B0,
.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
.lna_ctrl = 29,
+ .rf_switch = 17,
},
[SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = {
.name = "Hauppauge WinTV MiniCard",
@@ -199,8 +200,8 @@ int sms_board_power(struct smscore_device_t *coredev, int onoff)
case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2:
case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD:
/* LNA */
- sms_set_gpio(coredev,
- board->lna_ctrl, onoff ? 1 : 0);
+ if (!onoff)
+ sms_set_gpio(coredev, board->lna_ctrl, 0);
break;
}
return 0;
@@ -227,3 +228,21 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led)
}
return 0;
}
+
+int sms_board_lna_control(struct smscore_device_t *coredev, int onoff)
+{
+ int board_id = smscore_get_board_id(coredev);
+ struct sms_board *board = sms_get_board(board_id);
+
+ sms_debug("%s: LNA %s", __func__, onoff ? "enabled" : "disabled");
+
+ switch (board_id) {
+ case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2:
+ case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD:
+ sms_set_gpio(coredev,
+ board->rf_switch, onoff ? 1 : 0);
+ return sms_set_gpio(coredev,
+ board->lna_ctrl, onoff ? 1 : 0);
+ }
+ return -EINVAL;
+}