diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-06-04 14:58:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-04 15:47:11 -0400 |
commit | 249e66c32679a24706ec182256a79bf7b1dac9a2 (patch) | |
tree | c5af30726d8f4a84c75d88857e0880ceee5c6274 /sound/soc/tegra | |
parent | 5c5b08286fa4d782e44cae8738cf4328a29c4326 (diff) |
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')
-rw-r--r-- | sound/soc/tegra/tegra30_ahub.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index 0f4787c24e43..d554d46d08b5 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c | |||
@@ -640,8 +640,12 @@ static int tegra30_ahub_resume(struct device *dev) | |||
640 | { | 640 | { |
641 | int ret; | 641 | int ret; |
642 | 642 | ||
643 | ret = pm_runtime_get_sync(dev); | ||
644 | if (ret < 0) | ||
645 | return ret; | ||
643 | ret = regcache_sync(ahub->regmap_ahub); | 646 | ret = regcache_sync(ahub->regmap_ahub); |
644 | ret |= regcache_sync(ahub->regmap_apbif); | 647 | ret |= regcache_sync(ahub->regmap_apbif); |
648 | pm_runtime_put(dev); | ||
645 | 649 | ||
646 | return ret; | 650 | return ret; |
647 | } | 651 | } |
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) | |||
527 | static int tegra30_i2s_resume(struct device *dev) | 527 | static int tegra30_i2s_resume(struct device *dev) |
528 | { | 528 | { |
529 | struct tegra30_i2s *i2s = dev_get_drvdata(dev); | 529 | struct tegra30_i2s *i2s = dev_get_drvdata(dev); |
530 | int ret; | ||
530 | 531 | ||
531 | return regcache_sync(i2s->regmap); | 532 | ret = pm_runtime_get_sync(dev); |
533 | if (ret < 0) | ||
534 | return ret; | ||
535 | ret = regcache_sync(i2s->regmap); | ||
536 | pm_runtime_put(dev); | ||
537 | |||
538 | return ret; | ||
532 | } | 539 | } |
533 | #endif | 540 | #endif |
534 | 541 | ||