usb: dwc3-msm: Release PM wakelock in host mode only for auto targets
Currently the driver releases PM wakelock in host mode. This causes pm_suspend to get triggered. Although pm_suspend bails out but xhci_bus_suspend transitions the bus to a bad state leading to host mode failure. Fix this by releasing wakelock only for targets on which we allow PM suspend in host mode irrespective of runtimePM. Change-Id: I6648991272c0f22b032b526bce3a76864fec63a5 Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
This commit is contained in:
parent
6aa022f4eb
commit
4cda48e92c
1 changed files with 8 additions and 2 deletions
|
@ -3969,7 +3969,10 @@ static void dwc3_otg_sm_work(struct work_struct *w)
|
|||
mdwc->otg_state = OTG_STATE_A_IDLE;
|
||||
goto ret;
|
||||
}
|
||||
pm_wakeup_event(mdwc->dev, DWC3_WAKEUP_SRC_TIMEOUT);
|
||||
if (mdwc->no_wakeup_src_in_hostmode) {
|
||||
pm_wakeup_event(mdwc->dev,
|
||||
DWC3_WAKEUP_SRC_TIMEOUT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -3987,7 +3990,10 @@ static void dwc3_otg_sm_work(struct work_struct *w)
|
|||
dbg_event(0xFF, "XHCIResume", 0);
|
||||
if (dwc)
|
||||
pm_runtime_resume(&dwc->xhci->dev);
|
||||
pm_wakeup_event(mdwc->dev, DWC3_WAKEUP_SRC_TIMEOUT);
|
||||
if (mdwc->no_wakeup_src_in_hostmode) {
|
||||
pm_wakeup_event(mdwc->dev,
|
||||
DWC3_WAKEUP_SRC_TIMEOUT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue