diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-11-22 15:32:19 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 17:53:41 -0200 |
commit | 7b29e10d609035b5f93546ac6bcd1c5d810476a7 (patch) | |
tree | d5081671260df6195f37952e29515f1c7bdb0356 /drivers/media/dvb/siano/sms-cards.c | |
parent | 851a90914346b9a3b1afc0ae9c1ed2eb3dae9b5a (diff) |
V4L/DVB (9739): sms1xxx: enable signal quality indicator LEDs on Hauppauge WinTV MiniStick
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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index e17eb35877f..f4eb46a7c90 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c @@ -183,3 +183,25 @@ int sms_board_power(struct smscore_device_t *coredev, int onoff) } return 0; } + +int sms_board_led_feedback(struct smscore_device_t *coredev, int led) +{ + int board_id = smscore_get_board_id(coredev); + struct sms_board *board = sms_get_board(board_id); + + /* dont touch GPIO if LEDs are already set */ + if (smscore_led_state(coredev, -1) == led) + return 0; + + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + sms_set_gpio(coredev, + board->led_lo, (led & SMS_LED_LO) ? 1 : 0); + sms_set_gpio(coredev, + board->led_hi, (led & SMS_LED_HI) ? 1 : 0); + + smscore_led_state(coredev, led); + break; + } + return 0; +} |