diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-10 04:14:41 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-14 06:51:11 -0400 |
commit | 8de2f081ef8ee716663f916df9f2a7d015fa0dad (patch) | |
tree | 74319c3c14525f063754faab80406416b4a9f1dc /drivers/base/regmap/internal.h | |
parent | 13c54137f7896928ced8e97708d409fa39c09e00 (diff) |
regmap: Add functions to check for access on registers
We're going to be using these in quite a few places so factor out the
readable/writable/volatile/precious checks.
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index a67dc68aba5e..5ab3fefa4b05 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h | |||
@@ -48,6 +48,11 @@ struct regmap { | |||
48 | bool (*precious_reg)(struct device *dev, unsigned int reg); | 48 | bool (*precious_reg)(struct device *dev, unsigned int reg); |
49 | }; | 49 | }; |
50 | 50 | ||
51 | bool regmap_writeable(struct regmap *map, unsigned int reg); | ||
52 | bool regmap_readable(struct regmap *map, unsigned int reg); | ||
53 | bool regmap_volatile(struct regmap *map, unsigned int reg); | ||
54 | bool regmap_precious(struct regmap *map, unsigned int reg); | ||
55 | |||
51 | #ifdef CONFIG_DEBUG_FS | 56 | #ifdef CONFIG_DEBUG_FS |
52 | extern void regmap_debugfs_initcall(void); | 57 | extern void regmap_debugfs_initcall(void); |
53 | extern void regmap_debugfs_init(struct regmap *map); | 58 | extern void regmap_debugfs_init(struct regmap *map); |