* [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
@ 2024-08-15 9:38 Yuntao Liu
2024-08-19 8:30 ` Xingyu Wu
2024-08-28 20:20 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Yuntao Liu @ 2024-08-15 9:38 UTC (permalink / raw)
To: linux-clk, linux-kernel
Cc: kernel, hal.feng, mturquette, sboyd, conor.dooley, palmer,
xingyu.wu, liuyuntao12
We need to call pm_runtime_put_noidle() when pm_runtime_get_sync()
fails, so use pm_runtime_resume_and_get() instead. this function
will handle this.
Fixes: dae5448a327ed ("clk: starfive: Add StarFive JH7110 Video-Output clock driver")
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
---
drivers/clk/starfive/clk-starfive-jh7110-vout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/starfive/clk-starfive-jh7110-vout.c b/drivers/clk/starfive/clk-starfive-jh7110-vout.c
index 53f7af234cc2..aabd0484ac23 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-vout.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-vout.c
@@ -145,7 +145,7 @@ static int jh7110_voutcrg_probe(struct platform_device *pdev)
/* enable power domain and clocks */
pm_runtime_enable(priv->dev);
- ret = pm_runtime_get_sync(priv->dev);
+ ret = pm_runtime_resume_and_get(priv->dev);
if (ret < 0)
return dev_err_probe(priv->dev, ret, "failed to turn on power\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
2024-08-15 9:38 [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage Yuntao Liu
@ 2024-08-19 8:30 ` Xingyu Wu
2024-08-28 20:20 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Xingyu Wu @ 2024-08-19 8:30 UTC (permalink / raw)
To: Yuntao Liu, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: kernel@esmil.dk, Hal Feng, mturquette@baylibre.com,
sboyd@kernel.org, conor.dooley@microchip.com, palmer@rivosinc.com
On 15/08/2024 20:19, Yuntao Liu wrote:
>
> We need to call pm_runtime_put_noidle() when pm_runtime_get_sync() fails,
> so use pm_runtime_resume_and_get() instead. this function will handle this.
>
> Fixes: dae5448a327ed ("clk: starfive: Add StarFive JH7110 Video-Output clock
> driver")
> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
> ---
> drivers/clk/starfive/clk-starfive-jh7110-vout.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/starfive/clk-starfive-jh7110-vout.c
> b/drivers/clk/starfive/clk-starfive-jh7110-vout.c
> index 53f7af234cc2..aabd0484ac23 100644
> --- a/drivers/clk/starfive/clk-starfive-jh7110-vout.c
> +++ b/drivers/clk/starfive/clk-starfive-jh7110-vout.c
> @@ -145,7 +145,7 @@ static int jh7110_voutcrg_probe(struct platform_device
> *pdev)
>
> /* enable power domain and clocks */
> pm_runtime_enable(priv->dev);
> - ret = pm_runtime_get_sync(priv->dev);
> + ret = pm_runtime_resume_and_get(priv->dev);
> if (ret < 0)
> return dev_err_probe(priv->dev, ret, "failed to turn on
> power\n");
>
It looks good. Thanks for your patch.
Reviewed-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Best regards,
Xingyu Wu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
2024-08-15 9:38 [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage Yuntao Liu
2024-08-19 8:30 ` Xingyu Wu
@ 2024-08-28 20:20 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2024-08-28 20:20 UTC (permalink / raw)
To: Yuntao Liu, linux-clk, linux-kernel
Cc: kernel, hal.feng, mturquette, conor.dooley, palmer, xingyu.wu,
liuyuntao12
Quoting Yuntao Liu (2024-08-15 02:38:53)
> We need to call pm_runtime_put_noidle() when pm_runtime_get_sync()
> fails, so use pm_runtime_resume_and_get() instead. this function
> will handle this.
>
> Fixes: dae5448a327ed ("clk: starfive: Add StarFive JH7110 Video-Output clock driver")
> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-28 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 9:38 [PATCH] clk: starfive: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage Yuntao Liu
2024-08-19 8:30 ` Xingyu Wu
2024-08-28 20:20 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).