aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/stm
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@foss.st.com>2021-11-19 11:47:50 +0100
committerMark Brown <broonie@kernel.org>2021-11-22 15:40:27 +0000
commit32a956a1fadfd7d3924ab8ada2b7754054375903 (patch)
treea9515e95e251c64408b38db00d9f9f60ac16d324 /sound/soc/stm
parentASoC: SOF: Add support for Mediatek MT8195 (diff)
downloadwireguard-linux-32a956a1fadfd7d3924ab8ada2b7754054375903.tar.xz
wireguard-linux-32a956a1fadfd7d3924ab8ada2b7754054375903.zip
ASoC: stm32: i2s: add pm_runtime support
Enable support of pm_runtime on STM32 I2S driver to allow I2S power state monitoring. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20211119104752.13564-2-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/stm')
-rw-r--r--sound/soc/stm/stm32_i2s.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 6254bacad6eb..68c5de040df8 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
+#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/spinlock.h>
@@ -1113,6 +1114,7 @@ static int stm32_i2s_remove(struct platform_device *pdev)
{
snd_dmaengine_pcm_unregister(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -1150,6 +1152,8 @@ static int stm32_i2s_probe(struct platform_device *pdev)
return PTR_ERR(i2s->regmap);
}
+ pm_runtime_enable(&pdev->dev);
+
ret = snd_dmaengine_pcm_register(&pdev->dev, &stm32_i2s_pcm_config, 0);
if (ret) {
if (ret != -EPROBE_DEFER)