aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regmap.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-04 17:48:29 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 05:31:41 -0400
commitd3c242e1f22f5dfed009296ee45ce896153f0b53 (patch)
tree074bd0d53a1439e7201639d0acdeeedf5b3f0232 /drivers/base/regmap/regmap.c
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
regmap: allow regmap instances to be named
Some devices have multiple separate register regions. Logically, one regmap would be created per region. One issue that prevents this is that each instance will attempt to create the same debugfs files. Avoid this by allowing regmaps to be named, and use the name to construct the debugfs directory name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r--drivers/base/regmap/regmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 7a3f535e481c..b1dad1f9c47d 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -289,7 +289,7 @@ struct regmap *regmap_init(struct device *dev,
289 goto err_map; 289 goto err_map;
290 } 290 }
291 291
292 regmap_debugfs_init(map); 292 regmap_debugfs_init(map, config->name);
293 293
294 ret = regcache_init(map, config); 294 ret = regcache_init(map, config);
295 if (ret < 0) 295 if (ret < 0)
@@ -372,7 +372,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
372 map->precious_reg = config->precious_reg; 372 map->precious_reg = config->precious_reg;
373 map->cache_type = config->cache_type; 373 map->cache_type = config->cache_type;
374 374
375 regmap_debugfs_init(map); 375 regmap_debugfs_init(map, config->name);
376 376
377 map->cache_bypass = false; 377 map->cache_bypass = false;
378 map->cache_only = false; 378 map->cache_only = false;