* [PATCH] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
@ 2024-09-23 3:41 Jinjie Ruan
2024-09-26 16:53 ` Frank Li
0 siblings, 1 reply; 3+ messages in thread
From: Jinjie Ruan @ 2024-09-23 3:41 UTC (permalink / raw)
To: miquel.raynal, conor.culhane, alexandre.belloni, jun.li,
xiaoning.wang, linux-i3c
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.
Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
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 0a68fd1b81d4..575b337a5052 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1762,8 +1762,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] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
2024-09-23 3:41 [PATCH] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled Jinjie Ruan
@ 2024-09-26 16:53 ` Frank Li
2024-09-30 8:30 ` Miquel Raynal
0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2024-09-26 16:53 UTC (permalink / raw)
To: Jinjie Ruan
Cc: miquel.raynal, conor.culhane, alexandre.belloni, jun.li,
xiaoning.wang, linux-i3c
On Mon, Sep 23, 2024 at 11:41:22AM +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.
>
> Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> 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 0a68fd1b81d4..575b337a5052 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1762,8 +1762,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
--
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] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
2024-09-26 16:53 ` Frank Li
@ 2024-09-30 8:30 ` Miquel Raynal
0 siblings, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2024-09-30 8:30 UTC (permalink / raw)
To: Frank Li
Cc: Jinjie Ruan, conor.culhane, alexandre.belloni, jun.li,
xiaoning.wang, linux-i3c
Hi,
Frank.li@nxp.com wrote on Thu, 26 Sep 2024 12:53:59 -0400:
> On Mon, Sep 23, 2024 at 11:41:22AM +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.
> >
> > Fixes: 05be23ef78f7 ("i3c: master: svc: add runtime pm support")
> > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Missing Cc: stable.
>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
With the tag added,
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
--
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-09-30 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 3:41 [PATCH] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled Jinjie Ruan
2024-09-26 16:53 ` Frank Li
2024-09-30 8:30 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox