diff options
author | Jiaxin Yu <jiaxin.yu@mediatek.com> | 2019-05-22 16:52:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-23 15:34:29 +0200 |
commit | 5463eb5c2f758069d1db21ed2cf23339431c9481 (patch) | |
tree | b873446a97c940acd335b11ff44008d40351ecc5 /sound/soc/mediatek | |
parent | ASoC: Intel: Add machine driver for CX2072X on BYT/CHT platforms (diff) | |
download | linux-5463eb5c2f758069d1db21ed2cf23339431c9481.tar.xz linux-5463eb5c2f758069d1db21ed2cf23339431c9481.zip |
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: Jiaxin Yu <jiaxin.yu@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r-- | sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c index 56c37323bc13..4a31106d3471 100644 --- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c @@ -1142,8 +1142,6 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev) regcache_cache_only(afe->regmap, true); regcache_mark_dirty(afe->regmap); - pm_runtime_get_sync(&pdev->dev); - /* init memif */ afe->memif_size = MT8183_MEMIF_NUM; 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) static int mt8183_afe_pcm_dev_remove(struct platform_device *pdev) { - pm_runtime_put_sync(&pdev->dev); - pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt8183_afe_runtime_suspend(&pdev->dev); + return 0; } |