From: Kever Yang Date: Wed, 19 Jul 2017 11:54:21 +0000 (+0800) Subject: power: pwm_regulator: fix the pwm_set_config parameter order X-Git-Tag: v2017.09-rc1~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f339bca248f8060258c8e53fd9388dc6ca689af3;p=platform%2Fkernel%2Fu-boot.git 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 Acked-by: Philipp Tomsich Reviewed-by: Philipp Tomsich --- diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index 00a7cca..fcf5e00 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;