summaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra30_i2s.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-06-04 12:58:14 -0600
committerMark Brown <broonie@linaro.org>2013-06-04 20:47:11 +0100
commit249e66c32679a24706ec182256a79bf7b1dac9a2 (patch)
treec5af30726d8f4a84c75d88857e0880ceee5c6274 /sound/soc/tegra/tegra30_i2s.c
parent5c5b08286fa4d782e44cae8738cf4328a29c4326 (diff)
downloadlinux-249e66c32679a24706ec182256a79bf7b1dac9a2.tar.bz2
ASoC: tegra: add runtime PM to resume functions
Tegra HW needs clocks etc. active when touching registers. Make sure they are active during resume, by calling pm_runtime_get_sync() before touching HW. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/tegra/tegra30_i2s.c')
-rw-r--r--sound/soc/tegra/tegra30_i2s.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index bd0ebc09c8be..d04146cad61f 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -527,8 +527,15 @@ static int tegra30_i2s_suspend(struct device *dev)
static int tegra30_i2s_resume(struct device *dev)
{
struct tegra30_i2s *i2s = dev_get_drvdata(dev);
+ int ret;
- return regcache_sync(i2s->regmap);
+ ret = pm_runtime_get_sync(dev);
+ if (ret < 0)
+ return ret;
+ ret = regcache_sync(i2s->regmap);
+ pm_runtime_put(dev);
+
+ return ret;
}
#endif