Commit 421e8d2d authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent dcd6c922
...@@ -284,6 +284,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) ...@@ -284,6 +284,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->precious_reg = config->precious_reg; map->precious_reg = config->precious_reg;
map->cache_type = config->cache_type; map->cache_type = config->cache_type;
map->cache_bypass = false;
map->cache_only = false;
ret = regcache_init(map, config); ret = regcache_init(map, config);
mutex_unlock(&map->lock); mutex_unlock(&map->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment