mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
usb: mtu3: fix failed runtime suspend in host only mode
[ Upstream commit1c703e29da] 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:6b587394c6("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
57f66534a4
commit
faabbb103d
@@ -971,8 +971,6 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
|
||||
goto irq_err;
|
||||
}
|
||||
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
/* power down device IP for power saving by default */
|
||||
mtu3_stop(mtu);
|
||||
|
||||
|
||||
@@ -332,6 +332,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;
|
||||
|
||||
Reference in New Issue
Block a user