diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2019-06-12 22:59:10 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2019-06-26 12:39:10 +0300 |
commit | 7341c785d81ebf5472462b7f8ee27a96a59d5cf4 (patch) | |
tree | d5157551694c40a3312909db5c139248ea13f709 /crypto/twofish_common.c | |
parent | d6885b3e0a39ba7f93d4dc77ed9112e44a09b40d (diff) | |
download | linux-7341c785d81ebf5472462b7f8ee27a96a59d5cf4.tar.xz |
pwm: meson: Add support PWM_POLARITY_INVERSED when disabling
meson_pwm_apply() has to consider the PWM polarity when disabling the
output.
With enabled=false and polarity=PWM_POLARITY_NORMAL the output needs to
be LOW. The driver already supports this.
With enabled=false and polarity=PWM_POLARITY_INVERSED the output needs
to be HIGH. Implement this in the driver by internally enabling the
output with the same settings that we already use for "period == duty".
This fixes a PWM API violation which expects that the driver honors the
polarity also for enabled=false. Due to the IP block not supporting this
natively we only get "an as close as possible" to 100% HIGH signal (in
my test setup with input clock of 24MHz and measuring the output with a
logic analyzer at 24MHz sampling rate I got a duty cycle of 99.998475%
on a Khadas VIM).
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'crypto/twofish_common.c')
0 files changed, 0 insertions, 0 deletions