aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 08:39:37 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 08:49:30 -0500
commit421e8d2de3bd8b089dc6322d8589b7eb38437a23 (patch)
treeb98bf2c5f9d26748129616268638b55b4106d167 /drivers/base
parentdcd6c92267155e70a94b3927bce681ce74b80d1f (diff)
regmap: Reset cache status when reinitialsing the cache
When we reinitialise the cache make sure that we reset the cache access flags, ensuring that the reinitialised cache is in the default state which is what callers would and do expect given the function name. This is particularly likely to cause issues in systems where there was no cache previously as those systems have cache bypass enabled, as for the wm8994 driver where this was noticed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index be10a4ff6609..65558034318f 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -284,6 +284,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
284 map->precious_reg = config->precious_reg; 284 map->precious_reg = config->precious_reg;
285 map->cache_type = config->cache_type; 285 map->cache_type = config->cache_type;
286 286
287 map->cache_bypass = false;
288 map->cache_only = false;
289
287 ret = regcache_init(map, config); 290 ret = regcache_init(map, config);
288 291
289 mutex_unlock(&map->lock); 292 mutex_unlock(&map->lock);