From: Mark Brown Date: Mon, 9 Jan 2012 08:36:42 +0000 (-0800) Subject: mfd: Put WM8994 into cache only mode when suspending X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3befc925cb658227fb207f20e6719987f7ee3190;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Mark Brown --- diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 9b8d1ad28ee1..d3d9d53ca9e3 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -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);