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/internal.h | |
parent | 93de91245b66f20dd387c2745744950a11a5c436 (diff) |
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/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 7e61504a7ac3..78f87f316a1b 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -14,6 +14,7 @@ #define _REGMAP_INTERNAL_H #include <linux/regmap.h> +#include <linux/fs.h> struct regmap; @@ -36,10 +37,24 @@ struct regmap { struct regmap_format format; /* Buffer format */ const struct regmap_bus *bus; +#ifdef CONFIG_DEBUG_FS + struct dentry *debugfs; +#endif + unsigned int max_register; bool (*writeable_reg)(struct device *dev, unsigned int reg); bool (*readable_reg)(struct device *dev, unsigned int reg); bool (*volatile_reg)(struct device *dev, 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_exit(struct regmap *map); +#else +void regmap_debugfs_initcall(void) { } +void regmap_debugfs_init(struct regmap *map) { } +void regmap_debugfs_exit(struct regmap *map) { } +#endif + #endif |