aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/hwmon.h
diff options
context:
space:
mode:
authorVadim Pasternak <vadimp@nvidia.com>2023-02-12 16:57:30 +0200
committerGuenter Roeck <linux@roeck-us.net>2023-02-12 07:21:40 -0800
commita1ffd3c46267ee5c807acd780e15df9bb692223f (patch)
treec656a6c1313331b01670af51756b6f6b1414ce6c /include/linux/hwmon.h
parenthwmon: (gxp-fan-ctrl) use devm_platform_get_and_ioremap_resource() (diff)
downloadwireguard-linux-a1ffd3c46267ee5c807acd780e15df9bb692223f.tar.xz
wireguard-linux-a1ffd3c46267ee5c807acd780e15df9bb692223f.zip
hwmon: (mlxreg-fan) Return zero speed for broken fan
Currently for broken fan driver returns value calculated based on error code (0xFF) in related fan speed register. Thus, for such fan user gets fan{n}_fault to 1 and fan{n}_input with misleading value. Add check for fan fault prior return speed value and return zero if fault is detected. Fixes: 65afb4c8e7e4 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20230212145730.24247-1-vadimp@nvidia.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/linux/hwmon.h')
0 files changed, 0 insertions, 0 deletions