mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
usb: dwc3-msm: Use PROP_INPUT_CURRENT_LIMIT to for vbus_draw
The charger driver expects USB to indicate the amount of VBUS current to draw while in peripheral mode using the power_supply property POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT instead of POWER_SUPPLY_PROP_CURRENT_MAX, as the latter is intended as a read-only property which indicates the actual maximum current that the charger HW is allowed to draw. Change-Id: Icaab0032d9f545610f91c23bf5624095b1123317 Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
b38b5109bf
commit
97ed757748
1 changed files with 1 additions and 1 deletions
|
|
@ -4703,7 +4703,7 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA)
|
|||
/* Set max current limit in uA */
|
||||
pval.intval = 1000 * mA;
|
||||
ret = power_supply_set_property(mdwc->usb_psy,
|
||||
POWER_SUPPLY_PROP_CURRENT_MAX, &pval);
|
||||
POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, &pval);
|
||||
if (ret) {
|
||||
dev_dbg(mdwc->dev, "power supply error when setting property\n");
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue