diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2017-07-19 19:54:22 +0800 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-07-27 14:59:01 +0200 |
commit | 3030c951f19bf69fd12fe700d33c4be3ad2ee734 (patch) | |
tree | 80e91cc15c4cbbd5651360f3eac023be16b317f5 /drivers/power/regulator | |
parent | f339bca248f8060258c8e53fd9388dc6ca689af3 (diff) |
power: pwm_regulator: remove redundant code
The regulator_enable() should be called from upper layer like
regulators_enable_boot_on(), remove it from pwm regulator driver.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[fixed up typo in commit message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/power/regulator')
-rw-r--r-- | drivers/power/regulator/pwm_regulator.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index fcf5e00837..b63f941990 100644 --- a/drivers/power/regulator/pwm_regulator.c +++ b/drivers/power/regulator/pwm_regulator.c @@ -86,12 +86,8 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt) return ret; } - ret = pwm_set_enable(priv->pwm, priv->pwm_id, true); - if (ret) { - dev_err(dev, "Failed to enable PWM\n"); - return ret; - } priv->volt_uV = uvolt; + return ret; } @@ -144,8 +140,6 @@ static int pwm_regulator_probe(struct udevice *dev) if (priv->init_voltage) pwm_regulator_set_voltage(dev, priv->init_voltage); - pwm_regulator_enable(dev, 1); - return 0; } |