From: Thierry Reding <thierry.reding@gmail.com>
To: "Raphaël Poggi" <poggi.raph@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: pwm: atmel: problem when disable pwm
Date: Wed, 4 Jun 2014 16:46:39 +0200 [thread overview]
Message-ID: <20140604144639.GI28484@ulmo> (raw)
In-Reply-To: <CACqcpZDziJs7QUKVYwio=La5LyRzBd+xeeRW=dPFcPzw0Wrn5Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
Adding in the linux-pwm mailing list.
On Wed, Jun 04, 2014 at 02:56:13PM +0200, Raphaël Poggi wrote:
> Hello,
>
> I'm using the pwm-atmel driver to control led, but i'm facing a problem.
>
> When writing "echo 0 > /sys/class/leds/d1/brightness" (to switch off
> the led) sometimes the led stayed active.
>
> After investigation I think this problem is due to this function:
>
> static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
> {
> struct atmel_pwm_chip *atmel_pwm = to_atmel_pwm_chip(chip);
>
> atmel_pwm_writel(atmel_pwm, PWM_DIS, 1 << pwm->hwpwm);
>
> clk_disable(atmel_pwm->clk);
> }
>
> By disable the pwm channel, I think the duty cycle "0" has not been
> update, and the channel is disable and stayed in active state (high or
> low depending of polarity).
This sounds like a bug that could be fixed by this commit:
916030db4399 pwm: atmel: correct CDTY calculation
What version of the kernel are you seeing this problem with? The above
commit was first added in v3.15-rc1, so maybe try that or any later
version to see if that fixes it.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-06-04 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 12:56 pwm: atmel: problem when disable pwm Raphaël Poggi
2014-06-04 14:46 ` Thierry Reding [this message]
2014-06-04 15:05 ` Raphaël Poggi
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=20140604144639.GI28484@ulmo \
--to=thierry.reding@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=poggi.raph@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 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.