hwmon: (pmbus/bpa-rs600) Don't use rated limits as warn limits
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 12 Aug 2021 01:39:59 +0000 (13:39 +1200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 17 Aug 2021 21:54:26 +0000 (14:54 -0700)
commit7a8c68c57fd09541377f6971f25efdeb9a926c37
tree01d83a0d7c3211f7d75c109bc1b2a02a8ea8291f
parent2aee7e67bee7a5aa741bad6a0a472f108b29ad40
hwmon: (pmbus/bpa-rs600) Don't use rated limits as warn limits

In the initial implementation a number of PMBUS_x_WARN_LIMITs were
mapped to MFR fields. This was incorrect as these MFR limits reflect the
rated limit as opposed to a limit which will generate warning. Instead
return -ENXIO like we were already doing for other WARN_LIMITs.

Subsequently these rated limits have been exposed generically as new
fields in the sysfs ABI so the values are still available.

Fixes: 15b2703e5e02 ("hwmon: (pmbus) Add driver for BluTek BPA-RS600")
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20210812014000.26293-2-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/bpa-rs600.c