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>
Mon, 28 Feb 2022 01:03:18 +0000 (17:03 -0800)
commit8aba9ca62677570abf8c6b62611adb85bf1580ca
treef13b8d1c38639fcd691dec2d333da57cafcde44b
parent99cb5e9f7a78857657220f65533dce550331d629
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