usbtuner: control AVerMedia H837 LED
ManuChen [Mon, 13 Jul 2015 03:14:27 +0000 (11:14 +0800)]
Bug: 22351873
Bug 1736911

Change-Id: If229decccf3279ad3c2179a48cf877d1f1dc0578
Signed-off-by: Jean Huang <jeanh@nvidia.com>
Signed-off-by: Patrick Horng <phorng@nvidia.com>
Reviewed-on: http://git-master/r/1284463
(cherry picked from commit 6c3e92a4890beadbb0dc8fb7bb23fbd857a146b2)
Reviewed-on: http://git-master/r/1311291
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/1456505
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>

drivers/media/usb/cx231xx/cx231xx-core.c
drivers/media/usb/cx231xx/cx231xx.h

index e71e76e..1a509ee 100644 (file)
@@ -802,6 +802,7 @@ int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode)
                        cx231xx_set_agc_analog_digital_mux_select(dev, 0);
                        cx231xx_set_power_mode(dev, POLARIS_AVMODE_DIGITAL);
                        msleep(50);
+                       cx231xx_set_gpio_value(dev, AVERMEDIA_H837_LED_PIN, 0);
                        return 0;
                        }
                        break;
@@ -824,6 +825,7 @@ int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode)
                case CX231XX_BOARD_AVERMEDIA_H837M:
                        cx231xx_set_agc_analog_digital_mux_select(dev, 1);
                        cx231xx_set_power_mode(dev, POLARIS_AVMODE_DEFAULT);
+                       cx231xx_set_gpio_value(dev, AVERMEDIA_H837_LED_PIN, 1);
                        return 0;
                case CX231XX_BOARD_CNXT_CARRAERA:
                case CX231XX_BOARD_CNXT_RDE_250:
index b36b5c1..b04f696 100644 (file)
 #define SLEEP_S5H1432    30
 #define CX23417_OSC_EN   8
 #define CX23417_RESET    9
+#define AVERMEDIA_H837_LED_PIN 27
 
 struct cx23417_fmt {
        char  *name;