• Guenter Roeck's avatar
    hwmon: (pmbus) Fix low limit temperature alarms · 40257b95
    Guenter Roeck authored
    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.
    Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
    Acked-by: default avatarJean Delvare <khali@linux-fr.org>
    Cc: stable@kernel.org # 3.0+
    40257b95
pmbus_core.c 45 KB