linux_dsm_epyc7002/drivers/usb/core
Martin Blumenstingl f0e36d478f usb: core: use phy_exit during suspend if wake up is not supported
If the USB controller can wake up the system (which is the case for
example with the Mediatek USB3 IP) then we must not call phy_exit during
suspend to ensure that the USB controller doesn't have to re-enumerate
the devices during resume.
However, if the USB controller cannot wake up the system (which is the
case for example on various TI platforms using a dwc3 controller) then
we must call phy_exit during suspend. Otherwise the PHY driver keeps the
clocks enabled, which prevents the system from reaching the lowest power
levels in the suspend state.

Solve this by introducing two new functions in the PHY wrapper which are
dedicated to the suspend and resume handling.
If the controller can wake up the system the new usb_phy_roothub_suspend
function will simply call usb_phy_roothub_power_off. However, if wake up
is not supported by the controller it will also call
usb_phy_roothub_exit.
The also new usb_phy_roothub_resume function takes care of calling
usb_phy_roothub_init (if the controller can't wake up the system) in
addition to usb_phy_roothub_power_on.

Fixes: 07dbff0ddb ("usb: core: add a wrapper for the USB PHYs on the HCD")
Fixes: 178a0bce05 ("usb: core: hcd: integrate the PHY wrapper into the HCD core")
Reported-by: Roger Quadros <rogerq@ti.com>
Suggested-by: Roger Quadros <rogerq@ti.com>
Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-22 15:01:30 +02:00
..
buffer.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
config.c USB: Fix off by one in type-specific length check of BOS SSP capability 2017-12-19 11:40:54 +01:00
devices.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
devio.c usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill 2018-03-07 09:05:53 +11:00
driver.c usb: Don't print a warning if interface driver rebind is deferred at resume 2017-12-07 16:03:15 +01:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw 2018-03-23 14:11:54 +01:00
hcd-pci.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
hcd.c usb: core: use phy_exit during suspend if wake up is not supported 2018-04-22 15:01:30 +02:00
hub.c USB: Increment wakeup count on remote wakeup. 2018-04-22 14:45:11 +02:00
hub.h usb: core: introduce per-port over-current counters 2018-03-22 13:07:05 +01:00
Kconfig docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
ledtrig-usbport.c USB: of: clean up device-node helper 2017-11-28 15:12:38 +01:00
Makefile usb: core: add a wrapper for the USB PHYs on the HCD 2018-03-09 09:43:53 -08:00
message.c usb: quirks: add control message delay for 1b1c:1b20 2018-03-06 09:17:34 -08:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c USB: of: clean up device-node helper 2017-11-28 15:12:38 +01:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
phy.c usb: core: use phy_exit during suspend if wake up is not supported 2018-04-22 15:01:30 +02:00
phy.h usb: core: use phy_exit during suspend if wake up is not supported 2018-04-22 15:01:30 +02:00
port.c usb: core: introduce per-port over-current counters 2018-03-22 13:07:05 +01:00
quirks.c usb: core: Add quirk for HP v222w 16GB Mini 2018-04-22 14:45:12 +02:00
sysfs.c USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
urb.c usb: core: urb: Check SSP isoc ep comp descriptor 2018-03-20 10:13:30 +01:00
usb-acpi.c usb: clarify ACPI spec version and section number for _UPC & _PLD 2018-03-09 09:37:10 -08:00
usb.c usb: core: Add "quirks" parameter for usbcore 2018-03-20 10:16:09 +01:00
usb.h usb: core: Add "quirks" parameter for usbcore 2018-03-20 10:16:09 +01:00