Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12e051de authored by Devdutt Patnaik's avatar Devdutt Patnaik
Browse files

usb: gadget: Handle disconnect correctly during composition switch.



If cable is disconnected early during composition switch
android_disable calls the gadget pullup op which on clearing
run/stop bit does a pm_runtime_put_noidle on the dwc3 device.
This decrements the power usage count on the dwc3 device, but the
child count of the parent mdwc3 device is not decremented.
Upon disconnect handling in the DWC3 state machine,
pm_runtime_put_sync on mdwc3 parent returns EBUSY due to child count
not being 0. As a result runtime idle does not kick in and
prevents low power mode handler being invoked.
Fix this by changing the pm_runtime_put_noidle call to
pm_runtime_put_autosuspend on dwc3 device so that the child
count for the mdwc3 parent is decremented to 0.

CRs-Fixed: 980113
Change-Id: Ibb19188c4230a08bbdef72af7de066735e8c2d67
Signed-off-by: default avatarDevdutt Patnaik <dpatnaik@codeaurora.org>
parent e3ea6c56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment