mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 15:42:19 +02:00
This patch fix following two cases dwc2 resume does not recognize peripherals. 1. plug in device after system suspend, then press the power-on button to wake up,at this time the dr_mode is OTG, op_state is still Peripheral, the Bit[0] of GINTSTS is 1 and the port power is off, dwc2 will not resume at this time. 2. plug in device then press the power-on button to put the system to sleep, then we press the power-on button to wake up the system, At this time, the dr_mode is OTG, op_state is still Host, the Bit[0] of GINTSTS is 1, dwc2 will not resume and working abnormally. To resolve the first exception, we should call the dwc2_hsotg_resume() directly to resume dwc2. To resolve the second exception, if the dwc2 is lost power during suspend like RK3326S platform, wo should reinit the core to device mode, and after do dwc2_hsotg_resume, it can trigger the ID status change interrupt if the OTG cable is still connect. Then we can init it for host mode in the ID status change interrupt handler. We can use the power on bit of Hprt register to distinguish whether it is lost power during suspend. Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com> Change-Id: I7cd09bce993dcee8e5bfcaddd5fe884cdfab6b52 |
||
|---|---|---|
| .. | ||
| atm | ||
| c67x00 | ||
| cdns3 | ||
| chipidea | ||
| class | ||
| common | ||
| core | ||
| dwc2 | ||
| dwc3 | ||
| early | ||
| gadget | ||
| host | ||
| image | ||
| isp1760 | ||
| misc | ||
| mon | ||
| mtu3 | ||
| musb | ||
| phy | ||
| renesas_usbhs | ||
| roles | ||
| serial | ||
| storage | ||
| typec | ||
| usbip | ||
| Kconfig | ||
| Makefile | ||
| usb-skeleton.c | ||