hwmon: (pmbus) Fix low limit
Jean Delvare
Acked-byQuoted 9 lines · Guenter Roeck
Temperature alarms are detected by checking the alarm bit and comparing temperature limits against the current temperature. For low limits, this comparison needs to be reversed (temp < limit instead of temp > limit). This was not taken into account, resulting in wrong alarms if a temperature fell below a low limit.
Fix by adding a low limit flag in the limit data structure. When creating the sensor entry, the order of registers to compare is now reversed for low limits.
Quoted 7 lines
Signed-off-by Guenter Roeck <[email protected]>---
v2: One of the tagged alarms wasn't a low limit.drivers/hwmon/pmbus/pmbus_core.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)(...)
Acked-by Jean Delvare <[email protected]>
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors