提交 1c703e29 编写于 作者: C Chunfeng Yun 提交者: Greg Kroah-Hartman

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: 6b587394 ("usb: mtu3: support suspend/resume for dual-role mode")
Reviewed-by: NAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reported-by: NTianping Fang <tianping.fang@mediatek.com>
Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220929064459.32522-1-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 4b833fb3
...@@ -978,8 +978,6 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) ...@@ -978,8 +978,6 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
goto irq_err; goto irq_err;
} }
device_init_wakeup(dev, true);
/* power down device IP for power saving by default */ /* power down device IP for power saving by default */
mtu3_stop(mtu); mtu3_stop(mtu);
......
...@@ -356,6 +356,8 @@ static int mtu3_probe(struct platform_device *pdev) ...@@ -356,6 +356,8 @@ static int mtu3_probe(struct platform_device *pdev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
pm_runtime_get_sync(dev); pm_runtime_get_sync(dev);
device_init_wakeup(dev, true);
ret = ssusb_rscs_init(ssusb); ret = ssusb_rscs_init(ssusb);
if (ret) if (ret)
goto comm_init_err; goto comm_init_err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册