diff options
author | Tuomas Tynkkynen <ttynkkynen@nvidia.com> | 2014-07-21 17:38:47 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-25 19:29:28 +0200 |
commit | 8d7d3972a9ae962bbf8ce49c83f4a40082708f69 (patch) | |
tree | 07afde20ecc6fa6ab8a6e9372f44f2a0101a2191 /drivers/base/regmap | |
parent | Linux 3.16-rc1 (diff) | |
download | linux-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.xz 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 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 74d8c0672cf6..5ba0263fce21 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) |