diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-12-16 00:56:08 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:00 -0400 |
commit | d54093afb1eaa34ff0026cfcf72f471b9bf77e8a (patch) | |
tree | 1a2722b37e0448cac754c2c7c009f0ff48a6648e /drivers/media/dvb/siano/sms-cards.c | |
parent | b72857dd457b96de653b19b3c40394dac6285819 (diff) |
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.c | 23 |
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 79f5715c01fd..6c8faeb74840 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[] = { | |||
117 | .type = SMS_NOVA_B0, | 117 | .type = SMS_NOVA_B0, |
118 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", | 118 | .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", |
119 | .lna_ctrl = 29, | 119 | .lna_ctrl = 29, |
120 | .rf_switch = 17, | ||
120 | }, | 121 | }, |
121 | [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { | 122 | [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { |
122 | .name = "Hauppauge WinTV MiniCard", | 123 | .name = "Hauppauge WinTV MiniCard", |
@@ -199,8 +200,8 @@ int sms_board_power(struct smscore_device_t *coredev, int onoff) | |||
199 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | 200 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: |
200 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | 201 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: |
201 | /* LNA */ | 202 | /* LNA */ |
202 | sms_set_gpio(coredev, | 203 | if (!onoff) |
203 | board->lna_ctrl, onoff ? 1 : 0); | 204 | sms_set_gpio(coredev, board->lna_ctrl, 0); |
204 | break; | 205 | break; |
205 | } | 206 | } |
206 | return 0; | 207 | return 0; |
@@ -227,3 +228,21 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led) | |||
227 | } | 228 | } |
228 | return 0; | 229 | return 0; |
229 | } | 230 | } |
231 | |||
232 | int sms_board_lna_control(struct smscore_device_t *coredev, int onoff) | ||
233 | { | ||
234 | int board_id = smscore_get_board_id(coredev); | ||
235 | struct sms_board *board = sms_get_board(board_id); | ||
236 | |||
237 | sms_debug("%s: LNA %s", __func__, onoff ? "enabled" : "disabled"); | ||
238 | |||
239 | switch (board_id) { | ||
240 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | ||
241 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | ||
242 | sms_set_gpio(coredev, | ||
243 | board->rf_switch, onoff ? 1 : 0); | ||
244 | return sms_set_gpio(coredev, | ||
245 | board->lna_ctrl, onoff ? 1 : 0); | ||
246 | } | ||
247 | return -EINVAL; | ||
248 | } | ||