]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode
authorManu Gautam <mgautam@codeaurora.org>
Thu, 18 Jan 2018 11:24:30 +0000 (16:54 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Feb 2018 08:50:16 +0000 (10:50 +0200)
commit1ab95c6ed82c1b2be871b5e0bd5492c08f10fb6b
tree5ca6f6f3995b3a864f76a11918e8f0f0a5596fde
parentd42a718dbd616b04edac25bf6a01e078ce6266d0
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode

Commit d3eeedabdc2c ("usb: dwc3: Don't reinitialize core during
host bus-suspend/resume") updated suspend/resume routines to not
power_off and reinit PHYs/core for host mode.
It broke platforms that rely on DWC3 core to power_off PHYs to
enter low power state on system suspend.

Perform dwc3_core_exit/init only during host mode system_suspend/
resume to addresses power regression from above mentioned patch
and also allow USB session to stay connected across
runtime_suspend/resume in host mode. While at it also replace
existing checks for HOST only dr_mode with current_dr_role to
have similar core driver behavior for both Host-only and DRD+Host
configurations.

Fixes: d3eeedabdc2c ("usb: dwc3: Don't reinitialize core during host bus-suspend/resume")
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c