提交 3befc925 编写于 作者: M Mark Brown

mfd: Put WM8994 into cache only mode when suspending

This is required by the ASoC driver for very low power modes where the
device is fully idle but we want to update controls.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 b2ed1b0b
......@@ -268,6 +268,7 @@ static int wm8994_suspend(struct device *dev)
wm8994_reg_write(wm8994, WM8994_SOFTWARE_RESET,
wm8994_reg_read(wm8994, WM8994_SOFTWARE_RESET));
regcache_cache_only(wm8994->regmap, true);
regcache_mark_dirty(wm8994->regmap);
wm8994->suspended = true;
......@@ -298,6 +299,7 @@ static int wm8994_resume(struct device *dev)
return ret;
}
regcache_cache_only(wm8994->regmap, false);
ret = regcache_sync(wm8994->regmap);
if (ret != 0) {
dev_err(dev, "Failed to restore register map: %d\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册