From: Vasily Khoruzhick <anarsoul@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypass
Date: Tue, 16 Oct 2018 21:56:33 -0700 [thread overview]
Message-ID: <20181017045635.9857-1-anarsoul@gmail.com> (raw)
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
next reply other threads:[~2018-10-17 4:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 4:56 Vasily Khoruzhick [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181017045635.9857-1-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox