Loading drivers/usb/dwc3/dwc3-msm.c +9 −1 Original line number Diff line number Diff line Loading @@ -4270,6 +4270,14 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA) psy_type = get_psy_type(mdwc); if (psy_type == POWER_SUPPLY_TYPE_USB_FLOAT) { /* * Do not notify charger driver for any current and * bail out if suspend happened with float cable * connected */ if (mA == 2) return 0; if (!mA) pval.intval = -ETIMEDOUT; else Loading @@ -4280,11 +4288,11 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA) if (mdwc->max_power == mA || psy_type != POWER_SUPPLY_TYPE_USB) return 0; dev_info(mdwc->dev, "Avail curr from USB = %u\n", mA); /* Set max current limit in uA */ pval.intval = 1000 * mA; set_prop: dev_info(mdwc->dev, "Avail curr from USB = %u\n", mA); ret = power_supply_set_property(mdwc->usb_psy, POWER_SUPPLY_PROP_SDP_CURRENT_MAX, &pval); if (ret) { Loading Loading
drivers/usb/dwc3/dwc3-msm.c +9 −1 Original line number Diff line number Diff line Loading @@ -4270,6 +4270,14 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA) psy_type = get_psy_type(mdwc); if (psy_type == POWER_SUPPLY_TYPE_USB_FLOAT) { /* * Do not notify charger driver for any current and * bail out if suspend happened with float cable * connected */ if (mA == 2) return 0; if (!mA) pval.intval = -ETIMEDOUT; else Loading @@ -4280,11 +4288,11 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA) if (mdwc->max_power == mA || psy_type != POWER_SUPPLY_TYPE_USB) return 0; dev_info(mdwc->dev, "Avail curr from USB = %u\n", mA); /* Set max current limit in uA */ pval.intval = 1000 * mA; set_prop: dev_info(mdwc->dev, "Avail curr from USB = %u\n", mA); ret = power_supply_set_property(mdwc->usb_psy, POWER_SUPPLY_PROP_SDP_CURRENT_MAX, &pval); if (ret) { Loading