Commit 98e500a1 authored by Olivier Moysan's avatar Olivier Moysan Committed by Mark Brown

ASoC: stm32: dfsdm: add pm_runtime support for audio

Enable support of pm_runtime on STM32 DFSDM audio driver
to allow power state monitoring.
Signed-off-by: default avatarOlivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20211119104752.13564-3-olivier.moysan@foss.st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 32a956a1
......@@ -12,7 +12,7 @@
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/iio/iio.h>
#include <linux/iio/consumer.h>
#include <linux/iio/adc/stm32-dfsdm-adc.h>
......@@ -334,6 +334,8 @@ static int stm32_adfsdm_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, priv);
pm_runtime_enable(&pdev->dev);
ret = devm_snd_soc_register_component(&pdev->dev,
&stm32_adfsdm_dai_component,
&priv->dai_drv, 1);
......@@ -373,6 +375,7 @@ static int stm32_adfsdm_probe(struct platform_device *pdev)
static int stm32_adfsdm_remove(struct platform_device *pdev)
{
snd_soc_unregister_component(&pdev->dev);
pm_runtime_disable(&pdev->dev);
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