aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 16:19:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 16:19:15 -0700
commit91c2ff7708d4edf73ef1f0abb3ea4a44b4b0cf1d (patch)
tree43ddc350e2ee5e0f20b5273accdcc597b89da1f6 /drivers/base
parentMerge tag 'spi-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (diff)
parentMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regulator-next (diff)
downloadlinux-dev-91c2ff7708d4edf73ef1f0abb3ea4a44b4b0cf1d.tar.xz
linux-dev-91c2ff7708d4edf73ef1f0abb3ea4a44b4b0cf1d.zip
Merge tag 'regulator-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "A couple of nice new features this month, the ability to map regulators in order to allow voltage control by external coprocessors is something people have been asking for for a long time. - improved support for switch only "regulators", allowing current state to be read from the parent regulator but no setting. - support for obtaining the register access method used to set voltages, for use in systems which can offload control of this to a coprocessor (typically for DVFS). - support for Active-Semi AC8846, Dialog DA9211 and Texas Instruments TPS65917" * tag 'regulator-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (58 commits) regulator: act8865: fix build when OF is not enabled regulator: act8865: add act8846 to DT binding documentation regulator: act8865: add support for act8846 regulator: act8865: prepare support for other act88xx devices regulator: act8865: set correct number of regulators in pdata regulator: act8865: Remove error variable in act8865_pmic_probe regulator: act8865: fix parsing of platform data regulator: tps65090: Set voltage for fixed regulators regulator: core: Allow to get voltage count and list from parent regulator: core: Get voltage from parent if not available regulator: Add missing statics and inlines for stub functions regulator: lp872x: Don't set constraints within the regulator driver regmap: Fix return code for stub regmap_get_device() regulator: s2mps11: Update module description and Kconfig to add S2MPU02 support regulator: Add helpers for low-level register access regmap: Allow regmap_get_device() to be used by modules regmap: Add regmap_get_device regulator: da9211: Remove unnecessary devm_regulator_unregister() calls regulator: Add DT bindings for tps65218 PMIC regulators. regulator: da9211: new regulator driver ...
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 74d8c0672cf6..78f43fb2fe84 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1073,6 +1073,19 @@ 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;
+}
+EXPORT_SYMBOL_GPL(regmap_get_device);
+
static int _regmap_select_page(struct regmap *map, unsigned int *reg,
struct regmap_range_node *range,
unsigned int val_num)