diff mbox series

[1/2] clk: qcom: gcc-sc7180: Keep USB GDSC power domain on when USB wakeup is enabled

Message ID 20220822115246.1.I45235b7c40997bc2abf813e4722b4dcdd6aecf6b@changeid (mailing list archive)
State Superseded
Headers show
Series [1/2] clk: qcom: gcc-sc7180: Keep USB GDSC power domain on when USB wakeup is enabled | expand

Commit Message

Matthias Kaehlcke Aug. 22, 2022, 6:53 p.m. UTC
Set GENPD_FLAG_ACTIVE_WAKEUP for the USB GDSC power domain of SC7180.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---

 drivers/clk/qcom/gcc-sc7180.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd Aug. 22, 2022, 11:52 p.m. UTC | #1
Quoting Matthias Kaehlcke (2022-08-22 11:53:10)
> Set GENPD_FLAG_ACTIVE_WAKEUP for the USB GDSC power domain of SC7180.

Why? Does it fix something? Please add details to the commit text so we
know how urgent of a patch it is and why it is important.
Matthias Kaehlcke Aug. 23, 2022, 7:05 p.m. UTC | #2
Hi Stephen,

On Mon, Aug 22, 2022 at 04:52:05PM -0700, Stephen Boyd wrote:
> Quoting Matthias Kaehlcke (2022-08-22 11:53:10)
> > Set GENPD_FLAG_ACTIVE_WAKEUP for the USB GDSC power domain of SC7180.
> 
> Why? Does it fix something? Please add details to the commit text so we
> know how urgent of a patch it is and why it is important.

Without it USB is broken after resume when the PHYs remain enabled
during suspend.

Johan just sent a patch [1] that always disables the PHYs (again)
during system suspend, with that this series shouldn't be needed.
It is possible that in the future we add a mechanism to keep the
PHYs on depending on some config option (quick, kconfig, ...). If
that happens we'll have to revisit this series, for now it
shouldn't be needed assuming Johan's patch gets landed.

[1] https://patchwork.kernel.org/project/linux-usb/patch/20220823124047.14634-1-johan+linaro@kernel.org/
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c
index c2ea09945c47..2b6b66d01833 100644
--- a/drivers/clk/qcom/gcc-sc7180.c
+++ b/drivers/clk/qcom/gcc-sc7180.c
@@ -2223,6 +2223,7 @@  static struct gdsc usb30_prim_gdsc = {
 	.gdscr = 0x0f004,
 	.pd = {
 		.name = "usb30_prim_gdsc",
+		.flags = GENPD_FLAG_ACTIVE_WAKEUP,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 };