[PATCH] i3c: master: svc: Fix pm_runtime_set_suspended() with runtime pm enabled
Frank Li
Frank.li at nxp.com
Thu Sep 26 09:53:59 PDT 2024
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 at huawei.com>
Reviewed-by: Frank Li <Frank.Li at 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
More information about the linux-i3c
mailing list