summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorTuomas Tynkkynen2014-07-21 17:38:47 +0200
committerMark Brown2014-07-25 19:29:28 +0200
commit8d7d3972a9ae962bbf8ce49c83f4a40082708f69 (patch)
tree07afde20ecc6fa6ab8a6e9372f44f2a0101a2191 /include/linux/regmap.h
parentLinux 3.16-rc1 (diff)
downloadkernel-qcow2-linux-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.gz
kernel-qcow2-linux-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.xz
kernel-qcow2-linux-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.zip
regmap: Add regmap_get_device
Add a new function regmap_get_device to obtain the underlying struct device from a regmap. Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 7b0e4b425cdf..cd480fd59795 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -396,6 +396,7 @@ void regmap_exit(struct regmap *map);
int regmap_reinit_cache(struct regmap *map,
const struct regmap_config *config);
struct regmap *dev_get_regmap(struct device *dev, const char *name);
+struct device *regmap_get_device(struct regmap *map);
int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
int regmap_raw_write(struct regmap *map, unsigned int reg,
@@ -729,6 +730,12 @@ static inline struct regmap *dev_get_regmap(struct device *dev,
return NULL;
}
+static inline struct device *regmap_get_device(struct regmap *map)
+{
+ WARN_ONCE(1, "regmap API is disabled");
+ return -EINVAL;
+}
+
#endif
#endif