linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: pwm: atmel: problem when disable pwm
       [not found] <CACqcpZDziJs7QUKVYwio=La5LyRzBd+xeeRW=dPFcPzw0Wrn5Q@mail.gmail.com>
@ 2014-06-04 14:46 ` Thierry Reding
  0 siblings, 0 replies; only message in thread
From: Thierry Reding @ 2014-06-04 14:46 UTC (permalink / raw)
  To: Raphaël Poggi; +Cc: linux-kernel, linux-pwm

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-04 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CACqcpZDziJs7QUKVYwio=La5LyRzBd+xeeRW=dPFcPzw0Wrn5Q@mail.gmail.com>
2014-06-04 14:46 ` pwm: atmel: problem when disable pwm Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).