Skip to content

Commit

Permalink
Merge branch 'regulator-4.20' into regulator-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
broonie committed Dec 21, 2018
2 parents 7566ec3 + 2bb1666 commit 67a2ab9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/bd718x7-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
22 changes: 11 additions & 11 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion include/linux/regulator/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 67a2ab9

Please sign in to comment.