aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-12-11 20:44:49 +0000
committerMark Brown <broonie@kernel.org>2018-12-11 20:44:49 +0000
commite6202e8249aa7115af65f2d80b43c132816224ef (patch)
tree8865dd722ad55bb5e6bd5d446057395336ed0169 /drivers/regulator/core.c
parentregulator: s2mps11: Hand over GPIO to regulator core (diff)
parentMerge branch 'regulator-4.20' into regulator-linus (diff)
downloadlinux-dev-e6202e8249aa7115af65f2d80b43c132816224ef.tar.xz
linux-dev-e6202e8249aa7115af65f2d80b43c132816224ef.zip
Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 79cb090ff22f..ae0a559d1978 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1350,17 +1350,6 @@ static int set_machine_constraints(struct regulator_dev *rdev,
drms_uA_update(rdev);
}
- /* If the constraints say the regulator should be on at this point
- * and we have control then make sure it is enabled.
- */
- if (rdev->constraints->always_on || rdev->constraints->boot_on) {
- ret = _regulator_do_enable(rdev);
- if (ret < 0 && ret != -EINVAL) {
- rdev_err(rdev, "failed to enable\n");
- return ret;
- }
- }
-
if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable)
&& ops->set_ramp_delay) {
ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay);
@@ -1406,6 +1395,17 @@ static int set_machine_constraints(struct regulator_dev *rdev,
}
}
+ /* If the constraints say the regulator should be on at this point
+ * and we have control then make sure it is enabled.
+ */
+ if (rdev->constraints->always_on || rdev->constraints->boot_on) {
+ ret = _regulator_do_enable(rdev);
+ if (ret < 0 && ret != -EINVAL) {
+ rdev_err(rdev, "failed to enable\n");
+ return ret;
+ }
+ }
+
print_constraints(rdev);
return 0;
}