ASoC: amd: update pm_runtime enable sequence
authorArun Gopal Kondaveeti <arungopal.kondaveeti@amd.com>
Fri, 23 Jun 2023 21:41:40 +0000 (03:11 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 23 Jun 2023 10:07:39 +0000 (11:07 +0100)
pm_runtime_allow() is not needed for ACP child platform devices.
Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
& pm_runtime_set_active() in pm_runtime enable sequence for
ACP child platform drivers.

Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/ps/ps-pdm-dma.c
sound/soc/amd/raven/acp3x-pcm-dma.c
sound/soc/amd/renoir/acp3x-pdm-dma.c
sound/soc/amd/vangogh/acp5x-pcm-dma.c
sound/soc/amd/yc/acp6x-pdm-dma.c

index bdbbb797c74d03fa5ebd39101ef671b02a1c30df..d48f7c5af289c740396fe006f1aced620f8ad35b 100644 (file)
@@ -391,8 +391,9 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev)
        }
        pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
        pm_runtime_use_autosuspend(&pdev->dev);
+       pm_runtime_mark_last_busy(&pdev->dev);
+       pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_allow(&pdev->dev);
        return 0;
 }
 
index 7362dd15ad307fba8c9bfe62f7d899ce5e7ef8d0..9538f3ffc5d90aed6869634caf77a0264f24cae1 100644 (file)
@@ -416,8 +416,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
 
        pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
        pm_runtime_use_autosuspend(&pdev->dev);
+       pm_runtime_mark_last_busy(&pdev->dev);
+       pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_allow(&pdev->dev);
        return 0;
 }
 
index 4e299f96521fef8b15d78c2199ab23f9d5fe5e46..c3b47e9bd239243ac08670708b80262470f44b1d 100644 (file)
@@ -430,8 +430,9 @@ static int acp_pdm_audio_probe(struct platform_device *pdev)
        }
        pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
        pm_runtime_use_autosuspend(&pdev->dev);
+       pm_runtime_mark_last_busy(&pdev->dev);
+       pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_allow(&pdev->dev);
        return 0;
 }
 
index 29901ee4bfe387e64ed2cdd773a3a8a18d22687b..587dec5bb33d9d5d00acf9790010f59146e77517 100644 (file)
@@ -409,9 +409,9 @@ static int acp5x_audio_probe(struct platform_device *pdev)
        }
        pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
        pm_runtime_use_autosuspend(&pdev->dev);
+       pm_runtime_mark_last_busy(&pdev->dev);
+       pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_allow(&pdev->dev);
-
        return 0;
 }
 
index d818eba48546dc5bfd441a14d9af4716cd9eb382..72c4591e451bd9a40fefe457872013a7a477cb38 100644 (file)
@@ -383,8 +383,9 @@ static int acp6x_pdm_audio_probe(struct platform_device *pdev)
        }
        pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS);
        pm_runtime_use_autosuspend(&pdev->dev);
+       pm_runtime_mark_last_busy(&pdev->dev);
+       pm_runtime_set_active(&pdev->dev);
        pm_runtime_enable(&pdev->dev);
-       pm_runtime_allow(&pdev->dev);
        return 0;
 }