]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: iio: Use iio_read_channel_processed_scale for IIO_POWER
authorSean Anderson <sean.anderson@linux.dev>
Thu, 20 Jun 2024 21:20:05 +0000 (17:20 -0400)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 21 Jun 2024 15:09:32 +0000 (08:09 -0700)
commit52c1e818d66bfed276bd371f9e7947be4055af87
treed645a9f166f0c85a324470b5960339e52764d980
parent1226a1b2e5611d17aae55a01ad9d6883879feab4
hwmon: iio: Use iio_read_channel_processed_scale for IIO_POWER

Instead of rescaling power channels after the fact, use the dedicated
scaling API. This should reduce any inaccuracies resulting from the
scaling.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240620212005.821805-1-sean.anderson@linux.dev
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c