diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-04-04 15:48:29 -0600 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-10 10:31:41 +0100 |
commit | d3c242e1f22f5dfed009296ee45ce896153f0b53 (patch) | |
tree | 074bd0d53a1439e7201639d0acdeeedf5b3f0232 /drivers/base/regmap/internal.h | |
parent | dd775ae2549217d3ae09363e3edb305d0fa19928 (diff) | |
download | op-kernel-dev-d3c242e1f22f5dfed009296ee45ce896153f0b53.zip op-kernel-dev-d3c242e1f22f5dfed009296ee45ce896153f0b53.tar.gz |
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/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index fcafc5b..6beef66 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -41,6 +41,7 @@ struct regmap { #ifdef CONFIG_DEBUG_FS struct dentry *debugfs; + const char *debugfs_name; #endif unsigned int max_register; @@ -101,7 +102,7 @@ int _regmap_write(struct regmap *map, unsigned int reg, #ifdef CONFIG_DEBUG_FS extern void regmap_debugfs_initcall(void); -extern void regmap_debugfs_init(struct regmap *map); +extern void regmap_debugfs_init(struct regmap *map, const char *name); extern void regmap_debugfs_exit(struct regmap *map); #else static inline void regmap_debugfs_initcall(void) { } |