diff options
author | Uwe Kleine-König <[email protected]> | 2021-01-12 20:13:14 +0100 |
---|---|---|
committer | Guenter Roeck <[email protected]> | 2021-01-27 17:44:19 -0800 |
commit | 86585c61972f0997ed5fef54a2eb5de0b268ad86 (patch) | |
tree | a7d396e586f7382fec9ed38cbb4bcd684bcbb7f1 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
parent | 8c78f0dee4371ab3b0422edf08597525c6219512 (diff) |
hwmon: (pwm-fan) stop using legacy PWM functions and some cleanups
pwm_apply_state() does what the legacy functions pwm_config() and
pwm_{en,dis}able() do in a single function call. This simplifies error
handling and is more efficient for new-style PWM hardware drivers.
Instead of repeatedly querying the PWM framework about the initial PWM
configuration, cache the settings in driver data.
Also use __set_pwm() in .probe() to have the algorithm calculating the PWM
state in a single place.
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[groeck: Added missing empty line after declaration]
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions