diff options
author | 2019-06-12 21:59:08 +0200 | |
---|---|---|
committer | 2019-06-26 11:39:10 +0200 | |
commit | c375bcbaabdb92f0c007a044cda90450eef5ab43 (patch) | |
tree | c8277ee6344419db7213bc09cb3a30015457bf2e /tools/perf/scripts/python | |
parent | pwm: meson: Simplify the calculation of the pre-divider and count (diff) | |
download | wireguard-linux-c375bcbaabdb92f0c007a044cda90450eef5ab43.tar.xz wireguard-linux-c375bcbaabdb92f0c007a044cda90450eef5ab43.zip |
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 <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions