mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
usb: dwc3: request 2mA VBUS current when suspending
In case a SUSPEND (L2 or U3) event is detected but the device is not yet enumerated/configured, the device must still follow USB power rules and limit its current draw to ISUSP (2.5mA). Notify the gadget when this happens, which in turn will notify the charger driver. Change-Id: I10d890aabd78d841027b370eb62005d2e35e2a38 Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
1bc26ade8a
commit
2d5b401286
1 changed files with 2 additions and 0 deletions
|
|
@ -3472,6 +3472,8 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
|
|||
if (dwc->gadget.state >= USB_STATE_CONFIGURED)
|
||||
dwc3_gadget_suspend_interrupt(dwc,
|
||||
event->event_info);
|
||||
else
|
||||
usb_gadget_vbus_draw(&dwc->gadget, 2);
|
||||
}
|
||||
break;
|
||||
case DWC3_DEVICE_EVENT_SOF:
|
||||
|
|
|
|||
Loading…
Reference in a new issue