diff options
author | Mark Brown <broonie@kernel.org> | 2020-09-25 20:58:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-25 20:58:05 +0100 |
commit | 24c95ec9fbb630981a42c196766c1d21f4a28052 (patch) | |
tree | 4205db1d735b02d8e1f364720bb46bfb3c5431d0 | |
parent | d83fa234ae9ef68f973e1dabe19b7ec078cfcd63 (diff) | |
parent | dd759805d6f78262cb9aa63ef37e3bc263ef1978 (diff) |
Merge series "Enable runtime PM for SOF device" from Daniel Baluta <daniel.baluta@oss.nxp.com>
Daniel Baluta <daniel.baluta@nxp.com>:
From: Daniel Baluta <daniel.baluta@nxp.com>
This enables runtime PM for SOF device. Next patchseries will
provide PM suspend/resume handlers for i.MX8 specific devices.
Daniel Baluta (2):
ASoC: SOF: Activate runtime PM with SOF OF device
ASoC: SOF: Add .prepare/.complete callbacks
sound/soc/sof/sof-of-dev.c | 6 ++++++
1 file changed, 6 insertions(+)
--
2.17.1
-rw-r--r-- | sound/soc/sof/sof-of-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index f492c5dfa659..85ff0db88eb7 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -46,6 +46,8 @@ static struct sof_dev_desc sof_of_imx8mp_desc = { #endif static const struct dev_pm_ops sof_of_pm = { + .prepare = snd_sof_prepare, + .complete = snd_sof_complete, SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL) @@ -56,7 +58,11 @@ static void sof_of_probe_complete(struct device *dev) /* allow runtime_pm */ pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS); pm_runtime_use_autosuspend(dev); + pm_runtime_set_active(dev); pm_runtime_enable(dev); + + pm_runtime_mark_last_busy(dev); + pm_runtime_put_autosuspend(dev); } static int sof_of_probe(struct platform_device *pdev) |