OSDN Git Service

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 bdbbb79..d48f7c5 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 7362dd1..9538f3f 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 4e299f9..c3b47e9 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 29901ee..587dec5 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 d818eba..72c4591 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;
 }