linux/drivers/usb
Fabrice Gasnier 3ad02e0e52 usb: dwc2: drd: restore role and overrides upon resume
Override enable bits may not be restored when going to low power mode
(e.g. when in DWC2_POWER_DOWN_PARAM_NONE).
These bits are set when probing/initializing drd (role switch). Restore
them upon resume from low power mode (in case these have been lost).

To achieve this, the last known role is restored upon resume. And the
override enable bits are always set when configuring aval, bval and vbval.

When resuming, forcing the role should be done only once, or this can cause
port changes in HOST mode for instance.
So, only restore FORCEDEVMODE/FORCEHOSTMODE when role_sw is unused

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/1638806203-6624-4-git-send-email-fabrice.gasnier@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-17 16:52:51 +01:00
..
atm usb: atm: Use struct_size() helper 2021-10-05 12:50:22 +02:00
c67x00 usb/c67x00: Replace tasklet with work 2021-01-26 18:36:37 +01:00
cdns3 Merge 5.16-rc5 into usb-next 2021-12-13 10:11:05 +01:00
chipidea usb: chipidea: Set the DT node on the child device 2021-12-17 16:52:27 +01:00
class Merge 5.15-rc5 into usb-next 2021-10-11 07:39:38 +02:00
common Partially revert "usb: Kconfig: using select for USB_COMMON dependency" 2021-10-05 13:45:16 +02:00
core usb: hub: make wait_for_connected() take an int instead of a pointer to int 2021-12-17 11:00:09 +01:00
dwc2 usb: dwc2: drd: restore role and overrides upon resume 2021-12-17 16:52:51 +01:00
dwc3 usb: dwc3: gadget: Support Multi-Stream Transfer 2021-12-13 14:56:37 +01:00
early memblock: rename memblock_free to memblock_phys_free 2021-11-06 13:30:41 -07:00
gadget usb: aspeed-vhub: support test mode feature 2021-12-13 15:01:58 +01:00
host usb: uhci: Use platform_get_irq() to get the interrupt 2021-12-17 16:52:21 +01:00
image scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions 2021-10-16 21:32:16 -04:00
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc USB: iowarrior: fix control-message timeouts 2021-10-26 19:12:28 +02:00
mon
mtu3 usb: mtu3: enable wake-up interrupt after runtime_suspend called 2021-10-27 20:49:32 +02:00
musb usb: musb: Balance list entry in musb_gadget_queue 2021-10-22 11:12:45 +02:00
phy usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB: serial: option: add Fibocom FM101-GL variants 2021-11-24 19:03:31 +01:00
storage SCSI misc on 20211105 2021-11-05 08:42:02 -07:00
typec Merge 5.16-rc4 into usb-next 2021-12-06 09:31:18 +01:00
usbip usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00