diff options
author | Martin Blumenstingl <[email protected]> | 2019-06-12 21:59:08 +0200 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2019-06-26 11:39:10 +0200 |
commit | c375bcbaabdb92f0c007a044cda90450eef5ab43 (patch) | |
tree | c8277ee6344419db7213bc09cb3a30015457bf2e /net/lapb/lapb_in.c | |
parent | fb2081e870e9d59a0e6d076989e04c932c3ba23d (diff) |
pwm: meson: Read the full hardware state in meson_pwm_get_state()
Update the meson_pwm_get_state() implementation to take care of all
information in the registers instead of only reading the "enabled"
state.
The PWM output is only enabled if two conditions are met:
1. the per-channel clock is enabled
2. the PWM output is enabled
Calculate the PWM period and duty cycle using the reverse formula which
we already have in meson_pwm_calc() and update struct pwm_state with the
results.
As result of this /sys/kernel/debug/pwm now shows the PWM state set by
the bootloader (or firmware) after booting Linux.
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Martin Blumenstingl <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions