diff options
author | Mark Brown <broonie@kernel.org> | 2018-12-21 13:43:30 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-12-21 13:43:30 +0000 |
commit | 67a2ab931e9f79f516566e69c92e566b71fb20d1 (patch) | |
tree | a10fbb7d47c28f420f68ed42ba3270157e21d1ff | |
parent | 7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff) | |
parent | 2bb1666369339f69f227ad060c250afde94d5c69 (diff) |
Merge branch 'regulator-4.20' into regulator-linus
-rw-r--r-- | drivers/regulator/bd718x7-regulator.c | 1 | ||||
-rw-r--r-- | drivers/regulator/core.c | 22 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 2 |
3 files changed, 13 insertions, 12 deletions
diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c index 3a47e0372e77..7ba14dae5848 100644 --- a/drivers/regulator/bd718x7-regulator.c +++ b/drivers/regulator/bd718x7-regulator.c @@ -9,6 +9,7 @@ #include <linux/kernel.h> #include <linux/mfd/rohm-bd718x7.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2c66b528aede..6e146102fd93 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1158,17 +1158,6 @@ 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; - } - } - if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable) && ops->set_ramp_delay) { ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay); @@ -1214,6 +1203,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; } diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 25602afd4844..f3f76051e8b0 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator, static inline int regulator_set_load(struct regulator *regulator, int load_uA) { - return REGULATOR_MODE_NORMAL; + return 0; } static inline int regulator_allow_bypass(struct regulator *regulator, |