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>
{
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;
}
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