mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
usb: dwc3: debugfs: Fix mode switch for rockchip
When switch dwc3 mode to device on rockchip platform,
it may fails to connect to usb host because the auto
suspend delay is only 100ms. This patch sets the switch
mode to desired_role_sw_mode, and it can avoid to enter
runtime suspend.
Fixes: 5ac62b80f7 ("usb: dwc3: fix runtime pm for rockchip")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If3f7faee1e9550322a80f297136b8faf1ebed301
This commit is contained in:
@@ -440,6 +440,10 @@ static ssize_t dwc3_mode_write(struct file *file,
|
||||
if (!strncmp(buf, "otg", 3))
|
||||
mode = DWC3_GCTL_PRTCAP_OTG;
|
||||
|
||||
#if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI)
|
||||
dwc->desired_role_sw_mode = mode;
|
||||
#endif
|
||||
|
||||
dwc3_set_mode(dwc, mode);
|
||||
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user