]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pwm: meson: Support constant and polarity bits
authorGeorge Stark <gnstark@salutedevices.com>
Tue, 19 Nov 2024 12:53:16 +0000 (15:53 +0300)
committerUwe Kleine-König <ukleinek@kernel.org>
Mon, 14 Apr 2025 06:03:15 +0000 (08:03 +0200)
commitdd4d280ac5589fb3e1f333e6dbac4432abff4985
tree5afc655b7a02d6108fdaac97908438d956714948
parent8c22e890402a990d712538d6d46245df129cf302
pwm: meson: Support constant and polarity bits

Newer meson PWM IPs support constant and polarity bits. Support them to
correctly implement constant and inverted output levels.

Using constant bit allows to have truly stable low or high output level.
Since hi and low regs internally increment its values by 1 just writing
zero to any of them gives 1 clock count impulse. If constant bit is set
zero value in hi and low regs is not incremented.

Using polarity bit instead of swapping hi and low reg values allows to
correctly identify inversion in .get_state().

Signed-off-by: George Stark <gnstark@salutedevices.com>
Link: https://lore.kernel.org/r/20241119125318.3492261-3-gnstark@salutedevices.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-meson.c