]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (corsair-psu) add support for critical values
authorWilken Gottwalt <wilken.gottwalt@posteo.net>
Thu, 18 Mar 2021 14:17:14 +0000 (15:17 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 29 Mar 2021 22:04:41 +0000 (15:04 -0700)
commitfc7acdee05ea75dc7a5f84294e049ffe643dfff6
tree31407cba9249cb4cf91cc32866d21a0fac05db57
parentd8a08585259268e7b5305d04422a59d713719ccb
hwmon: (corsair-psu) add support for critical values

Adds support for reading the critical values of the temperature sensors
and the rail sensors (voltage and current) once and caches them. Updates
the naming of the constants following a more clear scheme. Also updates
the documentation and fixes some typos. Updates is_visible and ops_read
functions to be more readable.

The new sensors output of a Corsair HX850i will look like this:
corsairpsu-hid-3-1
Adapter: HID adapter
v_in:        230.00 V
v_out +12v:   12.14 V  (crit min =  +8.41 V, crit max = +15.59 V)
v_out +5v:     5.03 V  (crit min =  +3.50 V, crit max =  +6.50 V)
v_out +3.3v:   3.30 V  (crit min =  +2.31 V, crit max =  +4.30 V)
psu fan:        0 RPM
vrm temp:     +46.2°C  (crit = +70.0°C)
case temp:    +39.8°C  (crit = +70.0°C)
power total: 152.00 W
power +12v:  108.00 W
power +5v:    41.00 W
power +3.3v:   5.00 W
curr +12v:     9.00 A  (crit max = +85.00 A)
curr +5v:      8.31 A  (crit max = +40.00 A)
curr +3.3v:    1.62 A  (crit max = +40.00 A)

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/YFNg6vGk3sQmyqgB@monster.powergraphx.local
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/corsair-psu.rst
drivers/hwmon/corsair-psu.c