diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-20 22:56:53 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-08 15:57:00 +0900 |
commit | 31244e396fa9e4854cfd6dfe305983e77802c156 (patch) | |
tree | d2d9b4403802e8536e83304b3024352ba529f1fe /drivers/base/regmap/regmap.c | |
parent | 93de91245b66f20dd387c2745744950a11a5c436 (diff) | |
download | lwn-31244e396fa9e4854cfd6dfe305983e77802c156.tar.gz lwn-31244e396fa9e4854cfd6dfe305983e77802c156.zip |
regmap: Provide register map dump via debugfs
Copy over the read parts of the ASoC debugfs implementation into regmap,
allowing users to see what the register values the device has are at
runtime. The implementation, especially the support for seeking, is
mostly due to Dimitris Papastamos' work in ASoC.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index f51efeb091c5..a3eaef6552ce 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -156,6 +156,8 @@ struct regmap *regmap_init(struct device *dev, goto err_bus; } + regmap_debugfs_init(map); + return map; err_bus: @@ -172,6 +174,7 @@ EXPORT_SYMBOL_GPL(regmap_init); */ void regmap_exit(struct regmap *map) { + regmap_debugfs_exit(map); kfree(map->work_buf); module_put(map->bus->owner); kfree(map); @@ -472,3 +475,11 @@ out: return ret; } EXPORT_SYMBOL_GPL(regmap_update_bits); + +static int __init regmap_initcall(void) +{ + regmap_debugfs_initcall(); + + return 0; +} +postcore_initcall(regmap_initcall); |