summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
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 /drivers/base/regmap
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadop-kernel-dev-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.zip
op-kernel-dev-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.gz
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 'drivers/base/regmap')
-rw-r--r--drivers/base/regmap/regmap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 74d8c06..5ba0263 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1073,6 +1073,18 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name)
}
EXPORT_SYMBOL_GPL(dev_get_regmap);
+/**
+ * regmap_get_device(): Obtain the device from a regmap
+ *
+ * @map: Register map to operate on.
+ *
+ * Returns the underlying device that the regmap has been created for.
+ */
+struct device *regmap_get_device(struct regmap *map)
+{
+ return map->dev;
+}
+
static int _regmap_select_page(struct regmap *map, unsigned int *reg,
struct regmap_range_node *range,
unsigned int val_num)
OpenPOWER on IntegriCloud