* [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
@ 2024-09-30 9:19 Jinjie Ruan
2024-10-08 2:32 ` Jinjie Ruan
2024-10-31 23:08 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Jinjie Ruan @ 2024-09-30 9:19 UTC (permalink / raw)
To: miquel.raynal, conor.culhane, alexandre.belloni, xiaoning.wang,
jun.li, linux-i3c, linux-kernel
Cc: ruanjinjie
It is not valid to call pm_runtime_set_suspended() for devices
with runtime PM enabled because it returns -EAGAIN if it is enabled
already and working. So, call pm_runtime_disable() before to fix it.
Cc: stable@vger.kernel.org # v5.17
Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
v2:
- Add Reviewed-by.
- Add stable tag as Miquel suggested.
---
drivers/i3c/master/svc-i3c-master.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index a7bfc678153e..130cec4ee307 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1827,8 +1827,8 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
rpm_disable:
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
- pm_runtime_set_suspended(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
err_disable_clks:
svc_i3c_master_unprepare_clks(master);
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
2024-09-30 9:19 [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled Jinjie Ruan
@ 2024-10-08 2:32 ` Jinjie Ruan
2024-10-31 23:08 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Jinjie Ruan @ 2024-10-08 2:32 UTC (permalink / raw)
To: miquel.raynal, conor.culhane, alexandre.belloni, xiaoning.wang,
jun.li, linux-i3c, linux-kernel
Ping.
On 2024/9/30 17:19, Jinjie Ruan wrote:
> It is not valid to call pm_runtime_set_suspended() for devices
> with runtime PM enabled because it returns -EAGAIN if it is enabled
> already and working. So, call pm_runtime_disable() before to fix it.
>
> Cc: stable@vger.kernel.org # v5.17
> Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> v2:
> - Add Reviewed-by.
> - Add stable tag as Miquel suggested.
> ---
> drivers/i3c/master/svc-i3c-master.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index a7bfc678153e..130cec4ee307 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1827,8 +1827,8 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
> rpm_disable:
> pm_runtime_dont_use_autosuspend(&pdev->dev);
> pm_runtime_put_noidle(&pdev->dev);
> - pm_runtime_set_suspended(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> + pm_runtime_set_suspended(&pdev->dev);
>
> err_disable_clks:
> svc_i3c_master_unprepare_clks(master);
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
2024-09-30 9:19 [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled Jinjie Ruan
2024-10-08 2:32 ` Jinjie Ruan
@ 2024-10-31 23:08 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2024-10-31 23:08 UTC (permalink / raw)
To: miquel.raynal, conor.culhane, xiaoning.wang, jun.li, linux-i3c,
linux-kernel, Jinjie Ruan
On Mon, 30 Sep 2024 17:19:13 +0800, Jinjie Ruan wrote:
> It is not valid to call pm_runtime_set_suspended() for devices
> with runtime PM enabled because it returns -EAGAIN if it is enabled
> already and working. So, call pm_runtime_disable() before to fix it.
>
>
Applied, thanks!
[1/1] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
https://git.kernel.org/abelloni/c/18599e93e4e8
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-31 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 9:19 [PATCH v2] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled Jinjie Ruan
2024-10-08 2:32 ` Jinjie Ruan
2024-10-31 23:08 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox