提交 700c44b5 编写于 作者: J Justin Chen 提交者: Vinod Koul

phy: usb: Use slow clock for wake enabled suspend

The logic was incorrect when switching to slow clock. We want the slow
clock if wake_enabled is set.

Fixes: ae532b2b ("phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers")
Signed-off-by: NJustin Chen <justinpopo6@gmail.com>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/1665005418-15807-6-git-send-email-justinpopo6@gmail.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 833c173e
...@@ -337,13 +337,12 @@ static void usb_uninit_common_7216(struct brcm_usb_init_params *params) ...@@ -337,13 +337,12 @@ static void usb_uninit_common_7216(struct brcm_usb_init_params *params)
pr_debug("%s\n", __func__); pr_debug("%s\n", __func__);
if (!params->wake_enabled) { if (params->wake_enabled) {
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
/* Switch to using slower clock during suspend to save power */ /* Switch to using slower clock during suspend to save power */
USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN); USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN);
} else {
usb_wake_enable_7216(params, true); usb_wake_enable_7216(params, true);
} else {
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册