summary refs log tree commit diff
path: root/fs/gfs2/sys.h
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2019-06-12 21:59:08 +0200
committerThierry Reding <thierry.reding@gmail.com>2019-06-26 11:39:10 +0200
commitc375bcbaabdb92f0c007a044cda90450eef5ab43 (patch)
treec8277ee6344419db7213bc09cb3a30015457bf2e /fs/gfs2/sys.h
parentfb2081e870e9d59a0e6d076989e04c932c3ba23d (diff)
downloadlinux-c375bcbaabdb92f0c007a044cda90450eef5ab43.tar.gz
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 'fs/gfs2/sys.h')
0 files changed, 0 insertions, 0 deletions