aboutsummaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorTuomas Tynkkynen <ttynkkynen@nvidia.com>2014-07-21 18:38:47 +0300
committerMark Brown <broonie@linaro.org>2014-07-25 18:29:28 +0100
commit8d7d3972a9ae962bbf8ce49c83f4a40082708f69 (patch)
tree07afde20ecc6fa6ab8a6e9372f44f2a0101a2191 /include/linux/regmap.h
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
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