summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-06-20 10:37:37 +0200
committerMark Brown <broonie@linaro.org>2013-06-20 13:20:09 +0200
commit93134c7b40580ae8bb061d278a3ecffd7bbfccd6 (patch)
treee9174147184bd2b4336c5427f7fa9c019da026ac /drivers
parentLinux 3.10-rc6 (diff)
downloadlinux-93134c7b40580ae8bb061d278a3ecffd7bbfccd6.tar.xz
linux-93134c7b40580ae8bb061d278a3ecffd7bbfccd6.zip
regulator: of: Added a property to indicate bypass mode support
Added a property to indicate if the regulator supports bypass mode. Also modified of_get_regulation_constraints() to check for that property and set appropriate constraints. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/of_regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 66ca769287ab..f3c8f8f9dc39 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -61,6 +61,9 @@ static void of_get_regulation_constraints(struct device_node *np,
else /* status change should be possible if not always on. */
constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS;
+ if (of_property_read_bool(np, "regulator-allow-bypass"))
+ constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS;
+
ramp_delay = of_get_property(np, "regulator-ramp-delay", NULL);
if (ramp_delay)
constraints->ramp_delay = be32_to_cpu(*ramp_delay);