Commit 5463eb5c authored by Jiaxin Yu's avatar Jiaxin Yu Committed by Mark Brown

ASoC: Mediatek: MT8183: enable dev runtime suspend and resume

System suspend will power off audio, so we need regcache sync when
system resume.

Remove pm_runtime_get_sync in dev probe and pm_runtime_put_sync in
dev remove.So that audio dev can triggle runitme suspend and resume.
Signed-off-by: default avatarJiaxin Yu <jiaxin.yu@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3917da94
...@@ -1142,8 +1142,6 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev) ...@@ -1142,8 +1142,6 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
regcache_cache_only(afe->regmap, true); regcache_cache_only(afe->regmap, true);
regcache_mark_dirty(afe->regmap); regcache_mark_dirty(afe->regmap);
pm_runtime_get_sync(&pdev->dev);
/* init memif */ /* init memif */
afe->memif_size = MT8183_MEMIF_NUM; afe->memif_size = MT8183_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
...@@ -1235,11 +1233,10 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev) ...@@ -1235,11 +1233,10 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
static int mt8183_afe_pcm_dev_remove(struct platform_device *pdev) static int mt8183_afe_pcm_dev_remove(struct platform_device *pdev)
{ {
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev)) if (!pm_runtime_status_suspended(&pdev->dev))
mt8183_afe_runtime_suspend(&pdev->dev); mt8183_afe_runtime_suspend(&pdev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment