summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 13:39:37 +0000
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 07:56:46 -0800
commit4f94307fea52790af53c8dcdded22683aa42ed96 (patch)
tree6105148504c605cfb47eb402e39566e8dc750414 /drivers/base
parentfa17671aae4c6891ad008c0f4cb8ad2b21b41858 (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> (cherry picked from commit 421e8d2de3bd8b089dc6322d8589b7eb38437a23) Change-Id: I99959185b9dd9862717a2faf2d011c9966e23c7f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87576
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 94e808ba7514..6b3494dc1953 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -286,6 +286,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->precious_reg = config->precious_reg;
map->cache_type = config->cache_type;
+ map->cache_bypass = false;
+ map->cache_only = false;
+
ret = regcache_init(map, config);
mutex_unlock(&map->lock);