From: Boris BREZILLON <b.brezillon@overkiz.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Boris BREZILLON <b.brezillon@overkiz.com>
Subject: [PATCH 1/2] pwm: atmel-tcb: add missing clk source config
Date: Wed, 18 Sep 2013 17:06:05 +0200 [thread overview]
Message-ID: <1379516765-23342-1-git-send-email-b.brezillon@overkiz.com> (raw)
In-Reply-To: <1379516720-23289-1-git-send-email-b.brezillon@overkiz.com>
Clock source changes are never applied to the CMR register.
This may lead to wrong period/duty cycle configuration.
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
drivers/pwm/pwm-atmel-tcb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index ba6ce01..0266969 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -249,6 +249,8 @@ static int atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
}
}
+ cmr |= (tcbpwm->div & ATMEL_TC_TCCLKS);
+
__raw_writel(cmr, regs + ATMEL_TC_REG(group, CMR));
if (index == 0)
--
1.7.9.5
next prev parent reply other threads:[~2013-09-18 15:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 15:05 [PATCH 0/2] pwm: atmel-tcb: config fixes Boris BREZILLON
2013-09-18 15:06 ` Boris BREZILLON [this message]
2013-09-19 7:24 ` [PATCH 1/2] pwm: atmel-tcb: add missing clk source config Nicolas Ferre
2013-09-18 15:06 ` [PATCH 2/2] pwm: atmel-tcb: fix max time computation for slow clk source Boris BREZILLON
2013-09-19 7:24 ` Nicolas Ferre
2013-09-19 12:06 ` [PATCH 0/2] pwm: atmel-tcb: config fixes Thierry Reding
2013-09-19 12:11 ` boris brezillon
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=1379516765-23342-1-git-send-email-b.brezillon@overkiz.com \
--to=b.brezillon@overkiz.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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
all inboxes | Powered by JetHome®