All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypass
@ 2018-10-17  4:56 Vasily Khoruzhick
  2018-10-17  4:56 ` [U-Boot] [PATCH 2/3] pwm: sunxi: use new prescaler when configuring PWM Vasily Khoruzhick
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Vasily Khoruzhick @ 2018-10-17  4:56 UTC (permalink / raw)
  To: u-boot

Fix off-by-one that prevented PWM driver to use prescaler bypass.
Without this change prescaler is always enabled.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 drivers/pwm/sunxi_pwm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index 3c7dffdd90..baee503730 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -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])
 			continue;
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-10-24 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  4:56 [U-Boot] [PATCH 1/3] pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypass Vasily Khoruzhick
2018-10-17  4:56 ` [U-Boot] [PATCH 2/3] pwm: sunxi: use new prescaler when configuring PWM Vasily Khoruzhick
2018-10-17  4:56 ` [U-Boot] [PATCH 3/3] pwm: sunxi: choose best prescaler to improve PWM resolution Vasily Khoruzhick
2018-10-18 16:34   ` [U-Boot] [U-Boot, " Vagrant Cascadian
2018-10-22 18:29   ` [U-Boot] [PATCH " Jagan Teki
2018-10-22 18:35     ` Vasily Khoruzhick
2018-10-24 16:28   ` Jagan Teki
2018-10-24 17:07     ` Vasily Khoruzhick
2018-10-17  7:00 ` [U-Boot] [PATCH 1/3] pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypass Maxime Ripard
2018-10-18 21:10 ` Anatolij Gustschin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.