Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: ae532b2b7aa5 ("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>

authored by

Justin Chen and committed by
Vinod Koul
700c44b5 833c173e

+3 -4
+3 -4
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
··· 337 337 338 338 pr_debug("%s\n", __func__); 339 339 340 - if (!params->wake_enabled) { 341 - USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); 342 - 340 + if (params->wake_enabled) { 343 341 /* Switch to using slower clock during suspend to save power */ 344 342 USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN); 345 - } else { 346 343 usb_wake_enable_7216(params, true); 344 + } else { 345 + USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); 347 346 } 348 347 } 349 348