mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "usb: dwc3: Dont release wakeup source during usb restart"
This commit is contained in:
commit
1024a5df27
1 changed files with 13 additions and 11 deletions
|
|
@ -3374,17 +3374,19 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool force_power_collapse,
|
|||
|
||||
dwc3_msm_update_bus_bw(mdwc, BUS_VOTE_NONE);
|
||||
|
||||
/*
|
||||
* release wakeup source with timeout to defer system suspend to
|
||||
* handle case where on USB cable disconnect, SUSPEND and DISCONNECT
|
||||
* event is received.
|
||||
*/
|
||||
if (mdwc->lpm_to_suspend_delay) {
|
||||
dev_dbg(mdwc->dev, "defer suspend with %d(msecs)\n",
|
||||
mdwc->lpm_to_suspend_delay);
|
||||
pm_wakeup_event(mdwc->dev, mdwc->lpm_to_suspend_delay);
|
||||
} else {
|
||||
pm_relax(mdwc->dev);
|
||||
if (!mdwc->in_restart) {
|
||||
/*
|
||||
* release wakeup source with timeout to defer system suspend to
|
||||
* handle case where on USB cable disconnect, SUSPEND and DISCONNECT
|
||||
* event is received.
|
||||
*/
|
||||
if (mdwc->lpm_to_suspend_delay) {
|
||||
dev_dbg(mdwc->dev, "defer suspend with %d(msecs)\n",
|
||||
mdwc->lpm_to_suspend_delay);
|
||||
pm_wakeup_event(mdwc->dev, mdwc->lpm_to_suspend_delay);
|
||||
} else {
|
||||
pm_relax(mdwc->dev);
|
||||
}
|
||||
}
|
||||
|
||||
atomic_set(&dwc->in_lpm, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue