summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-10 17:14:41 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-14 19:51:11 +0900
commit8de2f081ef8ee716663f916df9f2a7d015fa0dad (patch)
tree74319c3c14525f063754faab80406416b4a9f1dc /drivers/base/regmap/internal.h
parent13c54137f7896928ced8e97708d409fa39c09e00 (diff)
downloadlinux-3.10-8de2f081ef8ee716663f916df9f2a7d015fa0dad.tar.gz
linux-3.10-8de2f081ef8ee716663f916df9f2a7d015fa0dad.tar.bz2
linux-3.10-8de2f081ef8ee716663f916df9f2a7d015fa0dad.zip
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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index a67dc68aba5..5ab3fefa4b0 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -48,6 +48,11 @@ struct regmap {
bool (*precious_reg)(struct device *dev, unsigned int reg);
};
+bool regmap_writeable(struct regmap *map, unsigned int reg);
+bool regmap_readable(struct regmap *map, unsigned int reg);
+bool regmap_volatile(struct regmap *map, unsigned int reg);
+bool regmap_precious(struct regmap *map, unsigned int reg);
+
#ifdef CONFIG_DEBUG_FS
extern void regmap_debugfs_initcall(void);
extern void regmap_debugfs_init(struct regmap *map);