]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit56b0d07be44a3a510a51afaf4012c0329c105202
treef13b8d1c38639fcd691dec2d333da57cafcde44b
parent197485cce8614c85a6e108edf4e98147e0f6892c
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