mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
hwmon: (mlxreg-fan) Fix macros for tacho fault reading
[ Upstream commit243cfe3fb8] Fix macros for tacometer fault reading. This fix is relevant for three Mellanox systems MQMB7, MSN37, MSN34, which are about to be released to the customers. At the moment, none of them is at customers sites. Fixes:65afb4c8e7("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
842aeeac33
commit
0d4ff09997
@@ -51,7 +51,7 @@
|
||||
*/
|
||||
#define MLXREG_FAN_GET_RPM(rval, d, s) (DIV_ROUND_CLOSEST(15000000 * 100, \
|
||||
((rval) + (s)) * (d)))
|
||||
#define MLXREG_FAN_GET_FAULT(val, mask) (!!((val) ^ (mask)))
|
||||
#define MLXREG_FAN_GET_FAULT(val, mask) (!((val) ^ (mask)))
|
||||
#define MLXREG_FAN_PWM_DUTY2STATE(duty) (DIV_ROUND_CLOSEST((duty) * \
|
||||
MLXREG_FAN_MAX_STATE, \
|
||||
MLXREG_FAN_MAX_DUTY))
|
||||
|
||||
Reference in New Issue
Block a user