diff options
author | Justin Chen <justinpopo6@gmail.com> | 2022-10-05 14:30:17 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-11-07 10:20:25 +0530 |
commit | 700c44b508020a3ea29d297c677f8d4ab14b7e6a (patch) | |
tree | 14dc2e675037ea3637dec7bf6c2062511f3a9c08 /drivers/phy/broadcom | |
parent | 833c173ebab420997b98a0d888fc5b55ee4a8a7e (diff) |
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>
Diffstat (limited to 'drivers/phy/broadcom')
-rw-r--r-- | drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c index 6a4d47886e0e..f78cff24eec8 100644 --- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c +++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c @@ -337,13 +337,12 @@ static void usb_uninit_common_7216(struct brcm_usb_init_params *params) pr_debug("%s\n", __func__); - if (!params->wake_enabled) { - USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); - + if (params->wake_enabled) { /* Switch to using slower clock during suspend to save power */ USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN); - } else { usb_wake_enable_7216(params, true); + } else { + USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); } } |