diff options
| author | Zhikui Ren <zhikui.ren@intel.com> | 2022-01-21 04:26:31 +0300 |
|---|---|---|
| committer | Zhikui Ren <zhikui.ren@intel.com> | 2022-03-10 01:11:54 +0300 |
| commit | f99c8aa5142aaa83cb19aaacf2166dafbb3828aa (patch) | |
| tree | 78e42bbe8dc792c1e3087a032a2997c43b171cb7 /include/linux | |
| parent | 4e36b22c7f85525a2fd7a4afecc12f7d3c84de04 (diff) | |
| download | linux-f99c8aa5142aaa83cb19aaacf2166dafbb3828aa.tar.xz | |
hwmon: (pmbus) auto detect pmbus fan pwm mode
PMBus device with fan controls have two possible control modes RPM and
PWM. RPM mode is assumed and FANx_TARGET sensor is always created to
provide read and write access of fan speed control. PWM only devices have
been able to use the FANx_TARGET sensor to read commanded fan speed
correctly because the pmbus core driver caches the write value and return
it when the TARGET sensor is read.
Recent pmbus_core driver change clears the cached value once the write to
FANx_TARGET completes. Read FANx_TARGET sensor now reads from actual PMBus
register. As a result, RPM mode only device, FANx_TARGET sensor always
read 0.
Add detection of current fan control mode during pmbus_identify and set
flag PMBUS_HAVE_PWM12 and/or PMBUS_HAVE_PWM34 if PWM mode is detected.
PWMx and PWMx_ENABLE sensors will be created based on these flags.
Fixes: 1ae5aaf5d1c5 ("hwmon: (pmbus) Clear sensor data after chip write"
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
