summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-07-19 13:54:23 +0300
committerKever Yang <kever.yang@rock-chips.com>2017-07-21 05:28:52 +0300
commit8f30a44b8341a917904486ee463a204a2932c628 (patch)
tree2d90f01f2c524d5fe892851d4faf4a9936b0e370
parent74f408eecb3485ce1a7de7c646e85bfce2cf64c9 (diff)
downloadu-boot-8f30a44b8341a917904486ee463a204a2932c628.tar.xz
power: pwm_regulator: fix the pwm_set_config parameter order
The rkpwm reg order has fixed by below patch: e3ef41d rockchip: pwm: fix the register layout for the PWM controller We need to correct the parameter order for pwm_set_config() to make the pwm regulator works correctly. Change-Id: I89d548972ce95454dee99522c0db83e5b90c8a76 Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--drivers/power/regulator/pwm_regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 00a7cca7f7..fcf5e00837 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -80,7 +80,7 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt)
}
ret = pwm_set_config(priv->pwm, priv->pwm_id,
- (priv->period_ns / 100) * duty_cycle, priv->period_ns);
+ priv->period_ns, (priv->period_ns / 100) * duty_cycle);
if (ret) {
dev_err(dev, "Failed to configure PWM\n");
return ret;