pwm: jz4740: Force TCU2 channels to return to their init level
authorPaul Cercueil <paul@crapouillou.net>
Fri, 7 Jun 2019 15:44:09 +0000 (17:44 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 26 Jun 2019 09:39:05 +0000 (11:39 +0200)
commit6580fd173070a3a494d94b40d7ca5e5a815fe29a
tree2b0880eb21aa067eaeb001f303a1e399edbe6f37
parent1ac99c58bda9b911d6e47ed6d4d04a2b00ff703b
pwm: jz4740: Force TCU2 channels to return to their init level

When the PWM mode of TCU2 channels is disabled, their corresponding pin
does not always return to its initial level. Force this by using a small
trick: we set duty > period, which is an invalid configuration for the
hardware, which then correctly resets the pin to the initial level.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-jz4740.c