summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPan Xiuli <xiuli.pan@linux.intel.com>2019-07-22 09:13:42 -0500
committerMark Brown <broonie@kernel.org>2019-07-23 12:18:00 +0100
commitf1b1b9b136827915624136624ff54aba5890a15b (patch)
tree81a97ed4e93661ad260ef7b460be5d9f6ad27787
parentf8f85216f8d309daadb37aba8a4b0826783d8747 (diff)
downloadlinux-stable-f1b1b9b136827915624136624ff54aba5890a15b.tar.gz
linux-stable-f1b1b9b136827915624136624ff54aba5890a15b.tar.bz2
linux-stable-f1b1b9b136827915624136624ff54aba5890a15b.zip
ASoC: SOF: pci: mark last_busy value at runtime PM init
If last_busy value is not set at runtime PM enable, the device will be suspend immediately after usage counter is 0. Set the last_busy value to make sure delay is working at first boot up. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190722141402.7194-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sof/sof-pci-dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 65d1bac4c6b8..6fd3df7c57a3 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -223,6 +223,9 @@ static void sof_pci_probe_complete(struct device *dev)
*/
pm_runtime_allow(dev);
+ /* mark last_busy for pm_runtime to make sure not suspend immediately */
+ pm_runtime_mark_last_busy(dev);
+
/* follow recommendation in pci-driver.c to decrement usage counter */
pm_runtime_put_noidle(dev);
}