Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 249e66c3 authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown
Browse files

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: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 5c5b0828
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -640,8 +640,12 @@ static int tegra30_ahub_resume(struct device *dev)
{
	int ret;

	ret = pm_runtime_get_sync(dev);
	if (ret < 0)
		return ret;
	ret = regcache_sync(ahub->regmap_ahub);
	ret |= regcache_sync(ahub->regmap_apbif);
	pm_runtime_put(dev);

	return ret;
}
+8 −1
Original line number Diff line number Diff line
@@ -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