summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2012-09-24 18:56:53 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-15 11:56:08 +0900
commitbd7a2b600ace90c8819495b639a744c8f5c68feb (patch)
treed4853e6a5bd7e3bbdf54808c37358870bfd33336 /drivers/regulator
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
downloadop-kernel-dev-bd7a2b600ace90c8819495b639a744c8f5c68feb.zip
op-kernel-dev-bd7a2b600ace90c8819495b639a744c8f5c68feb.tar.gz
regulator: core: Support for continuous voltage range
Some regulators can set any voltage within the constraints range, not being limited to specified operating points. This patch makes it possible to describe such regulator and makes the regulator_is_supported_voltage() function behave correctly. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5c4829c..f7c74db 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1979,6 +1979,11 @@ int regulator_is_supported_voltage(struct regulator *regulator,
return ret;
}
+ /* Any voltage within constrains range is fine? */
+ if (rdev->desc->continuous_voltage_range)
+ return min_uV >= rdev->constraints->min_uV &&
+ max_uV <= rdev->constraints->max_uV;
+
ret = regulator_count_voltages(regulator);
if (ret < 0)
return ret;
OpenPOWER on IntegriCloud