Commit a877d4b1 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Jagan Teki

pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypass

Fix off-by-one that prevented PWM driver to use prescaler bypass.
Without this change prescaler is always enabled.
Signed-off-by: default avatarVasily Khoruzhick <>
Acked-by: Maxime Ripard's avatarMaxime Ripard <>
Reviewed-by: default avatarJagan Teki <>
parent 1ed3c095
......@@ -74,7 +74,7 @@ static int sunxi_pwm_set_config(struct udevice *dev, uint channel,
debug("%s: period_ns=%u, duty_ns=%u\n", __func__, period_ns, duty_ns);
for (prescaler = 0; prescaler < SUNXI_PWM_CTRL_PRESCALE0_MASK;
for (prescaler = 0; prescaler <= SUNXI_PWM_CTRL_PRESCALE0_MASK;
prescaler++) {
if (!prescaler_table[prescaler])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment