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

Commit f968c24e authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: PHY: msm: Clear A_BUS_SUSPEND on cable disconnect



A_BUS_SUSPEND is set on device mode bus-suspend and
cleared on bus-resume. But, bus-resume may not happen
if cable disconnect happens in suspend. This results
in LPM sequence executing as if LPM on bus-suspend is
triggered. Fix this by clearing A_BUS_SUSPEND after
stopping peripheral mode which happens before low
power mode routine is executed.

Change-Id: I186021c3046d5c98b1da7735e057c537652443f0
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 049b7256
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2010,6 +2010,7 @@ static void msm_otg_start_peripheral(struct usb_otg *otg, int on)
		msm_otg_dbg_log_event(&motg->phy, "GADGET OFF",
			motg->inputs, otg->phy->state);
		usb_gadget_vbus_disconnect(otg->gadget);
		clear_bit(A_BUS_SUSPEND, &motg->inputs);
		/* Configure BUS performance parameters to default */
		msm_otg_bus_vote(motg, USB_MIN_PERF_VOTE);