Loading drivers/usb/phy/phy-msm-usb.c +17 −0 Original line number Diff line number Diff line Loading @@ -1425,6 +1425,16 @@ psy_error: return -ENXIO; } static void msm_otg_set_online_status(struct msm_otg *motg) { if (!psy) dev_dbg(motg->phy.dev, "no usb power supply registered\n"); /* Set power supply online status to false */ if (power_supply_set_online(psy, false)) dev_dbg(motg->phy.dev, "error setting power supply property\n"); } static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) { struct usb_gadget *g = motg->phy.otg->gadget; Loading @@ -1444,6 +1454,13 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) "Failed notifying %d charger type to PMIC\n", motg->chg_type); /* * This condition will be true when usb cable is disconnected * during bootup before charger detection mechanism starts. */ if (motg->online && motg->cur_power == 0 && mA == 0) msm_otg_set_online_status(motg); if (motg->cur_power == mA) return; Loading Loading
drivers/usb/phy/phy-msm-usb.c +17 −0 Original line number Diff line number Diff line Loading @@ -1425,6 +1425,16 @@ psy_error: return -ENXIO; } static void msm_otg_set_online_status(struct msm_otg *motg) { if (!psy) dev_dbg(motg->phy.dev, "no usb power supply registered\n"); /* Set power supply online status to false */ if (power_supply_set_online(psy, false)) dev_dbg(motg->phy.dev, "error setting power supply property\n"); } static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) { struct usb_gadget *g = motg->phy.otg->gadget; Loading @@ -1444,6 +1454,13 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) "Failed notifying %d charger type to PMIC\n", motg->chg_type); /* * This condition will be true when usb cable is disconnected * during bootup before charger detection mechanism starts. */ if (motg->online && motg->cur_power == 0 && mA == 0) msm_otg_set_online_status(motg); if (motg->cur_power == mA) return; Loading