hwmon: (asus-ec-sensors) deduce sensor signedness from its type
authorEugene Shalygin <eugene.shalygin@gmail.com>
Fri, 11 Feb 2022 16:48:55 +0000 (17:48 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 13 Feb 2022 15:31:13 +0000 (07:31 -0800)
commit5e68869aba1abb563279c5afdbb1cb10d40c7c73
treed0b80bf3ca1518a203a6bbf6a92acd44a453bc7c
parent4d49367c5303e3ebd17502a45b74de280f6be539
hwmon: (asus-ec-sensors) deduce sensor signedness from its type

Reading DSDT code for ASUS X470-based boards (the ones served by the
asus_wmi_Sensors driver), where ASUS put hardware monitoring functions
into the WMI code, reveals that fan and current sensors data is
unsigned. For the current sensor that was confirmed by a user who showed
high enough current value for overflow.

Thus let's assume that the signedness of the sensors is determined by its
type and that only temperature ones provide signed numbers.

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20220211164855.265698-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/asus-ec-sensors.c