summaryrefslogtreecommitdiff
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-06-11 17:37:04 -0700
committerMark Brown <broonie@kernel.org>2015-06-12 13:09:43 +0100
commit23c779b9f9161d6568d3b2fca06e70ad182c480c (patch)
tree314598f81db70f24dc8ead5f84c708cb8d5f00ef /drivers/regulator/of_regulator.c
parent22a10bca280073f81e9e2d9fed6f90a3bcf00236 (diff)
regulator: Add pull down support
Some regulators need to be configured to pull down a resistor when the regulator is disabled. Add an op (set_pull_down) and a DT property + constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 482a86f90839..c3433db0acda 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -67,6 +67,8 @@ static void of_get_regulation_constraints(struct device_node *np,
if (!constraints->always_on) /* status change should be possible. */
constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS;
+ constraints->pull_down = of_property_read_bool(np, "regulator-pull-down");
+
if (of_property_read_bool(np, "regulator-allow-bypass"))
constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS;