rk: restore file mode
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / usbdev_rk3126.c
index 601404920146cf18f795352a0a6f98fd199f7710..ad005cbee57059b082cefdc1862c26716618ebfa 100755 (executable)
@@ -1,3 +1,4 @@
+#ifdef CONFIG_ARM
 #include "usbdev_rk.h"
 #include "usbdev_grf_regs.h"
 #include "dwc_otg_regs.h"
@@ -190,10 +191,12 @@ static void dwc_otg_uart_mode(void *pdata, int enter_usb_uart_mode)
 static void usb20otg_power_enable(int enable)
 {
        if (0 == enable) {
+               rk_battery_charger_detect_cb(USB_OTG_POWER_OFF);
                /* disable otg_drv power */
                if (gpio_is_valid(control_usb->otg_gpios->gpio))
                        gpio_set_value(control_usb->otg_gpios->gpio, 0);
        } else if (1 == enable) {
+               rk_battery_charger_detect_cb(USB_OTG_POWER_ON);
                /* enable otg_drv power */
                if (gpio_is_valid(control_usb->otg_gpios->gpio))
                        gpio_set_value(control_usb->otg_gpios->gpio, 1);
@@ -846,4 +849,4 @@ MODULE_ALIAS("platform: dwc_control_usb");
 MODULE_AUTHOR("RockChip Inc.");
 MODULE_DESCRIPTION("RockChip Control Module USB Driver");
 MODULE_LICENSE("GPL v2");
-
+#endif