]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: atmel: Fix incorrect CDTY value after disabling
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 25 May 2015 16:11:49 +0000 (18:11 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 12 Jun 2015 09:16:12 +0000 (11:16 +0200)
commitecabb267962fa508dfc9d07b5e0bcad80162ebcd
treec8e8c98f9737977e5442f45797a6b88c61a2f995
parent151585b9e5f9f5c7b1188fded1fa75d8d1cf9ff7
pwm: atmel: Fix incorrect CDTY value after disabling

pwm-leds calls .config() and .disable() in a row. This exhibits that it
may happen that the channel gets disabled before CDTY has been updated
with CUPD. The issue gets quite worse with long periods. So, ensure that
at least one period has past before disabling the channel by polling
ISR.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Gaƫl PORTAY <gael.portay@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel.c