Skip to content

Commit 795537e

Browse files
Ryceancurrygregkh
authored andcommitted
phy: usb: Use slow clock for wake enabled suspend
commit 700c44b upstream. The logic was incorrect when switching to slow clock. We want the slow clock if wake_enabled is set. Fixes: ae532b2 ("phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers") Signed-off-by: Justin Chen <justinpopo6@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/1665005418-15807-6-git-send-email-justinpopo6@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 88b0104 commit 795537e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,12 @@ static void usb_uninit_common_7216(struct brcm_usb_init_params *params)
337337

338338
pr_debug("%s\n", __func__);
339339

340-
if (!params->wake_enabled) {
341-
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
342-
340+
if (params->wake_enabled) {
343341
/* Switch to using slower clock during suspend to save power */
344342
USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN);
345-
} else {
346343
usb_wake_enable_7216(params, true);
344+
} else {
345+
USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN);
347346
}
348347
}
349348

0 commit comments

Comments
 (0)