提交 72969073 编写于 作者: W Wilken Gottwalt 提交者: Guenter Roeck

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: NWilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/20201113121954.GA8488@monster.powergraphx.localSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 66d5b034
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册