summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-05-27 13:52:24 +0200
committerThierry Reding <thierry.reding@gmail.com>2020-06-02 14:24:26 +0200
commita020f22a4ff555386f136eb951e16e4cff709e01 (patch)
tree725d04bb2259db4742e4eaca31654a656424ea4e /Kconfig
parent9017dc4fbd59c09463019ce494cfe36d654495a8 (diff)
downloadlinux-a020f22a4ff555386f136eb951e16e4cff709e01.tar.bz2
pwm: jz4740: Make PWM start with the active part
The PWM in Ingenic SoCs starts in inactive state until the internal timer reaches the duty value, then becomes active until the timer reaches the period value. In theory, we should then use (period - duty) as the real duty value, as a high duty value would otherwise result in the PWM pin being inactive most of the time. This is the reason why the duty value was inverted in the driver until now, but it still had the problem that it would not start with the active part. To address this remaining issue, the common trick is to invert the duty, and invert the polarity when the PWM is enabled. Since the duty was already inverted, and we invert it again, we now program the hardware for the requested duty, and simply invert the polarity when the PWM is enabled. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions