diff options
author | Wilken Gottwalt <wilken.gottwalt@posteo.net> | 2020-11-13 13:19:54 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-12-02 17:42:23 -0800 |
commit | 72969073dedb678d5ec5abfeb840a0863f79c5a9 (patch) | |
tree | 0d1341564794e6ad69ce4d818a8eea37f80e0c0f /drivers/hwmon | |
parent | 66d5b034ea5cc617a402c5d81f56c22aa85a801f (diff) |
hwmon: (corsair-psu) Fix fan rpm calculation
The correct fan rpm value is also a LINEAR11 value but without a factor.
Verified by using the fan test button on the psu to let the fan spin up
to maximum for some seconds.
Fixes: 933222c98445 ("hwmon: (corsair-psu) fix unintentional sign extension issue")
Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/20201113121954.GA8488@monster.powergraphx.local
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/corsair-psu.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c index 5d19a888231a..99494056f4bd 100644 --- a/drivers/hwmon/corsair-psu.c +++ b/drivers/hwmon/corsair-psu.c @@ -252,12 +252,7 @@ static int corsairpsu_get_value(struct corsairpsu_data *priv, u8 cmd, u8 rail, l *val = corsairpsu_linear11_to_int(tmp & 0xFFFF) * 1000; break; case PSU_CMD_FAN: - /* - * this value is best guess, so the calculated value could be wrong, it is hard - * to ge the fan to spin in these semi-passive power supplies, which need a - * quite high load to do so - */ - *val = ((tmp & 0xFF) << 8) + ((tmp >> 8) & 0xFF); + *val = corsairpsu_linear11_to_int(tmp & 0xFFFF); break; case PSU_CMD_RAIL_WATTS: case PSU_CMD_TOTAL_WATTS: |