summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorStephen Boyd2015-06-12 02:37:04 +0200
committerMark Brown2015-06-12 14:09:43 +0200
commit23c779b9f9161d6568d3b2fca06e70ad182c480c (patch)
tree314598f81db70f24dc8ead5f84c708cb8d5f00ef /drivers/regulator/core.c
parentregulator: Add system_load constraint (diff)
downloadkernel-qcow2-linux-23c779b9f9161d6568d3b2fca06e70ad182c480c.tar.gz
kernel-qcow2-linux-23c779b9f9161d6568d3b2fca06e70ad182c480c.tar.xz
kernel-qcow2-linux-23c779b9f9161d6568d3b2fca06e70ad182c480c.zip
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/core.c')
-rw-r--r--drivers/regulator/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c8d5e2b05fdf..60fcfba52592 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1051,6 +1051,14 @@ static int set_machine_constraints(struct regulator_dev *rdev,
}
}
+ if (rdev->constraints->pull_down && ops->set_pull_down) {
+ ret = ops->set_pull_down(rdev);
+ if (ret < 0) {
+ rdev_err(rdev, "failed to set pull down\n");
+ goto out;
+ }
+ }
+
print_constraints(rdev);
return 0;
out: