summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-01 10:17:08 (GMT)
committerMark Brown <broonie@linaro.org>2013-07-01 10:17:08 (GMT)
commit0a192cc8600bede44a0425402758631d410a7c6f (patch)
tree7aeb844ebe2002ba6e05482f674e0c989be9061e /drivers
parent39c9f80f43d754dadb2cd1adbc365840b5e99cca (diff)
parent2a668a8bc2cbe7a464ab1212475a3efb23a94b1e (diff)
downloadlinux-0a192cc8600bede44a0425402758631d410a7c6f.tar.xz
Merge remote-tracking branch 'regulator/topic/linar' into regulator-next
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 815d6df..288c75a 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2138,6 +2138,21 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector)
EXPORT_SYMBOL_GPL(regulator_list_voltage);
/**
+ * regulator_get_linear_step - return the voltage step size between VSEL values
+ * @regulator: regulator source
+ *
+ * Returns the voltage step size between VSEL values for linear
+ * regulators, or return 0 if the regulator isn't a linear regulator.
+ */
+unsigned int regulator_get_linear_step(struct regulator *regulator)
+{
+ struct regulator_dev *rdev = regulator->rdev;
+
+ return rdev->desc->uV_step;
+}
+EXPORT_SYMBOL_GPL(regulator_get_linear_step);
+
+/**
* regulator_is_supported_voltage - check if a voltage range can be supported
*
* @regulator: Regulator to check.