X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=blobdiff_plain;f=drivers%2Fusb%2Fdwc_otg_310%2Fusbdev_rk3368.c;h=3272e4e99c5fcdd604c1c7f9be0d9e40f1cef616;hp=833671c1e1e51f24a1194b35122ab0b9151a97a2;hb=9a47b6de548a83d198e2a92b53fe735c62832515;hpb=b4e7e31d6a73b8a93e73bb409d495171c4cc09f1 diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3368.c b/drivers/usb/dwc_otg_310/usbdev_rk3368.c index 833671c1e1e5..3272e4e99c5f 100644 --- a/drivers/usb/dwc_otg_310/usbdev_rk3368.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk3368.c @@ -189,13 +189,14 @@ static void usb20otg_power_enable(int enable) /* disable otg_drv power */ if (gpio_is_valid(control_usb->otg_gpios->gpio)) gpio_set_value(control_usb->otg_gpios->gpio, 0); - else if (usb20otg_get_status(USB_STATUS_BVABLID)) - rk_battery_charger_detect_cb(USB_OTG_POWER_OFF); + + rk_battery_charger_detect_cb(USB_OTG_POWER_OFF); } else if (1 == enable) { /* enable otg_drv power */ if (gpio_is_valid(control_usb->otg_gpios->gpio)) gpio_set_value(control_usb->otg_gpios->gpio, 1); - else if (!usb20otg_get_status(USB_STATUS_BVABLID)) + + if (!usb20otg_get_status(USB_STATUS_BVABLID)) rk_battery_charger_detect_cb(USB_OTG_POWER_ON); } }