summaryrefslogtreecommitdiff
path: root/drivers/power/regulator
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-07-19 19:54:21 +0800
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-07-27 14:59:01 +0200
commitf339bca248f8060258c8e53fd9388dc6ca689af3 (patch)
tree4df5908443e6b3a36da73809b4f2e95edce19328 /drivers/power/regulator
parent7ba3182e2d92190b7512db35ecda71970a206207 (diff)
downloadu-boot-f339bca248f8060258c8e53fd9388dc6ca689af3.tar.gz
u-boot-f339bca248f8060258c8e53fd9388dc6ca689af3.tar.bz2
u-boot-f339bca248f8060258c8e53fd9388dc6ca689af3.zip
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. 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>
Diffstat (limited to 'drivers/power/regulator')
-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;