aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/mtu3/mtu3_plat.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2022-09-29 14:44:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-30 13:55:48 +0200
commit1c703e29da5efac6180e4c189029fa34b7e48e97 (patch)
tree09e8b49c1c84f4bb5b6f00184f56463a8f45c71c /drivers/usb/mtu3/mtu3_plat.c
parentUSB: omap_udc: Fix spelling mistake: "tranceiver_ctrl" -> "transceiver_ctrl" (diff)
downloadwireguard-linux-1c703e29da5efac6180e4c189029fa34b7e48e97.tar.xz
wireguard-linux-1c703e29da5efac6180e4c189029fa34b7e48e97.zip
usb: mtu3: fix failed runtime suspend in host only mode
When the dr_mode is "host", after the host enter runtime suspend, the mtu3 can't do it, because the mtu3's device wakeup function is not enabled, instead it's enabled in gadget init function, to fix the issue, init wakeup early in mtu3's probe() Fixes: 6b587394c65c ("usb: mtu3: support suspend/resume for dual-role mode") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reported-by: Tianping Fang <tianping.fang@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/20220929064459.32522-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_plat.c')
-rw-r--r--drivers/usb/mtu3/mtu3_plat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 4cb65346789d..d78ae52b4e26 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -356,6 +356,8 @@ static int mtu3_probe(struct platform_device *pdev)
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
+ device_init_wakeup(dev, true);
+
ret = ssusb_rscs_init(ssusb);
if (ret)
goto comm_init_err;