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

Commit 2d78afab authored by Tarun Gupta's avatar Tarun Gupta Committed by Gerrit - the friendly Code Review server
Browse files

USB: gadeget: ci13xxx: Before remote wake_up cancel suspend work



During suspend of the phy there is a window where clocks are off and
we are still not in LPM. if a remote wakeup happens in this window,
it might lead to unclocked access from the driver. Hence flush the
otg driver suspend work before proceeding with remote wakeup handling.

Change-Id: I40d547955570a4ec4e9340b4d1c9ff85890c6bb4
Signed-off-by: default avatarTarun Gupta <tarung@codeaurora.org>
parent 5e498329
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1647,6 +1647,10 @@ static int ci13xxx_wakeup(struct usb_gadget *_gadget)
	}
	spin_unlock_irqrestore(udc->lock, flags);

	/* Make sure phy driver is done with its bus suspend handling */
	if (udc->udc_driver->cancel_pending_suspend)
		udc->udc_driver->cancel_pending_suspend(udc);

	if ((udc->udc_driver->in_lpm != NULL) &&
	    (udc->udc_driver->in_lpm(udc))) {
		if (udc->udc_driver->set_fpr_flag) {