diff mbox series

clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC

Message ID 20250107-x1e80100-clk-gcc-fix-usb2-gdsc-pwrsts-v1-1-e15d1a5e7d80@linaro.org (mailing list archive)
State Accepted
Commit d26c4ad3fa53e76a602a9974ade171c8399f2a29
Headers show
Series clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC | expand

Commit Message

Abel Vesa Jan. 7, 2025, 3:55 p.m. UTC
Allowing the usb_2 controller GDSC to be turned off during system suspend
renders the controller unable to resume.

So use PWRSTS_RET_ON instead in order to make sure this the GDSC doesn't
go down.

Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
Cc: stable@vger.kernel.org      # 6.8
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/clk/qcom/gcc-x1e80100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 7b4b9bf203da94fbeac75ed3116c84aa03e74578
change-id: 20250107-x1e80100-clk-gcc-fix-usb2-gdsc-pwrsts-a8eae668c7d2

Best regards,

Comments

Johan Hovold Jan. 7, 2025, 4:15 p.m. UTC | #1
On Tue, Jan 07, 2025 at 05:55:23PM +0200, Abel Vesa wrote:
> Allowing the usb_2 controller GDSC to be turned off during system suspend
> renders the controller unable to resume.
> 
> So use PWRSTS_RET_ON instead in order to make sure this the GDSC doesn't
> go down.
> 
> Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
> Cc: stable@vger.kernel.org      # 6.8
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>  drivers/clk/qcom/gcc-x1e80100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
> index 8ea25aa25dff043ab4a81fee78b6173139f871b6..7288af845434d824eb91489ab97be25d665cad3a 100644
> --- a/drivers/clk/qcom/gcc-x1e80100.c
> +++ b/drivers/clk/qcom/gcc-x1e80100.c
> @@ -6083,7 +6083,7 @@ static struct gdsc gcc_usb20_prim_gdsc = {
>  	.pd = {
>  		.name = "gcc_usb20_prim_gdsc",
>  	},
> -	.pwrsts = PWRSTS_OFF_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>  	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
>  };

This does the trick and matches what we do for the other controllers:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>

Johan
Bjorn Andersson Jan. 8, 2025, 2:13 a.m. UTC | #2
On Tue, 07 Jan 2025 17:55:23 +0200, Abel Vesa wrote:
> Allowing the usb_2 controller GDSC to be turned off during system suspend
> renders the controller unable to resume.
> 
> So use PWRSTS_RET_ON instead in order to make sure this the GDSC doesn't
> go down.
> 
> 
> [...]

Applied, thanks!

[1/1] clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC
      commit: d26c4ad3fa53e76a602a9974ade171c8399f2a29

Best regards,
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
index 8ea25aa25dff043ab4a81fee78b6173139f871b6..7288af845434d824eb91489ab97be25d665cad3a 100644
--- a/drivers/clk/qcom/gcc-x1e80100.c
+++ b/drivers/clk/qcom/gcc-x1e80100.c
@@ -6083,7 +6083,7 @@  static struct gdsc gcc_usb20_prim_gdsc = {
 	.pd = {
 		.name = "gcc_usb20_prim_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
 };