summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-07-19 13:59:55 +0300
committerKever Yang <kever.yang@rock-chips.com>2017-07-21 05:28:52 +0300
commitab2d7d206c99666e7ad2980f4540b6c0ba8d969f (patch)
treed2ecad52d33ed03f2c2e797cfd799d63ce5df182
parent8f30a44b8341a917904486ee463a204a2932c628 (diff)
downloadu-boot-ab2d7d206c99666e7ad2980f4540b6c0ba8d969f.tar.xz
power: pwm_regulator: remove redundance code
The regulator_enable() should be called from upper layer like regulators_enable_boot_on(), remove it from pwm regulator driver. Change-Id: Ibb4e631d42fa8099cc25abf3d0b61c031c7804fa Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--drivers/power/regulator/pwm_regulator.c8
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;
}