]> asedeno.scripts.mit.edu Git - linux.git/commit
hwmon: (iio_hwmon) Enable power exporting from IIO
authorMichal Simek <michal.simek@xilinx.com>
Thu, 22 Aug 2019 14:22:24 +0000 (16:22 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 3 Sep 2019 19:47:17 +0000 (12:47 -0700)
commitbc34301b10672dcc86cc3d93cfbf785eba16ddbe
treedfd936c119a4da2864eb74017916eae3608308b2
parentbe7ec9196bc487771415ba063188e6356625f703
hwmon: (iio_hwmon) Enable power exporting from IIO

There is no reason why power channel shouldn't be exported as is done for
voltage, current, temperature and humidity.

Power channel is available on iio ina226 driver.

Sysfs IIO documentation for power attribute added by commit 7c6d5c7ee883
("iio: Documentation: Add missing documentation for power attribute")
is declaring that value is in mili-Watts but hwmon interface is expecting
value in micro-Watts that's why there is a need for mili-Watts to
micro-Watts conversion.

Tested on Xilinx ZCU102 board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/db71f5ae87e4521a2856a1be5544de0b6cede575.1566483741.git.michal.simek@xilinx.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c