mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
usb: mtu3: condition PHY wakeup for host mode and runtime suspend
Host bus activity during gadget mode system suspend can trigger unexpected system wakeups via interrupts because PHY wakeup is enabled unconditionally. Improve the suspend flow by conditioning PHY wakeup setup on device_may_wakeup() and restricting it to host mode or runtime suspend to ensure proper wakeup handling in gadget mode. Signed-off-by: Fei Shao <fshao@chromium.org> Link: https://patch.msgid.link/20260626082218.2750459-3-fshao@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e69027c253
commit
2fe9a76eb3
|
|
@ -544,7 +544,8 @@ static int mtu3_suspend_common(struct device *dev, pm_message_t msg)
|
|||
|
||||
ssusb_phy_power_off(ssusb);
|
||||
clk_bulk_disable_unprepare(BULK_CLKS_CNT, ssusb->clks);
|
||||
ssusb_wakeup_set(ssusb, true);
|
||||
if (device_may_wakeup(dev) && (ssusb->is_host || PMSG_IS_AUTO(msg)))
|
||||
ssusb_wakeup_set(ssusb, true);
|
||||
return 0;
|
||||
|
||||
sleep_err:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user