summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-26 19:30:16 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-26 19:34:49 +0100
commita24f64a648376766497fddd8bc24b1ca5b906431 (patch)
treeb06e00797e507aa884b11bbba3f45dd66e5b0b90 /drivers/base/regmap
parentregmap: Unexport regcache_write() and regcache_read() (diff)
downloadlinux-a24f64a648376766497fddd8bc24b1ca5b906431.tar.xz
linux-a24f64a648376766497fddd8bc24b1ca5b906431.zip
regmap: Reset device debugfs when reinitialising the cache
Most of the data exposed via debugfs is for or from the cache so reset all the debugfs configuration to make sure everything is up to date with the latest configuration, especially if we're changing cache type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap')
-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 e9c2ac0174c6..2d71aeae3109 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -278,6 +278,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
mutex_lock(&map->lock);
regcache_exit(map);
+ regmap_debugfs_exit(map);
map->max_register = config->max_register;
map->writeable_reg = config->writeable_reg;
@@ -286,6 +287,8 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->precious_reg = config->precious_reg;
map->cache_type = config->cache_type;
+ regmap_debugfs_init(map);
+
ret = regcache_init(map, config);
mutex_unlock(&map->lock);