Skip to content

Commit

Permalink
mfd: Put WM8994 into cache only mode when suspending
Browse files Browse the repository at this point in the history
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 9, 2012
1 parent b2ed1b0 commit 3befc92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3befc92

Please sign in to comment.