hwmon: (pmbus/adm1275) support PMBUS_VIRT_*_SAMPLES
authorAdamski, Krzysztof (Nokia - PL/Wroclaw) <krzysztof.adamski@nokia.com>
Wed, 29 May 2019 14:36:21 +0000 (14:36 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jun 2019 01:33:01 +0000 (18:33 -0700)
commitc83529c17e12046ac4a8d8fbbc49c51255c7b4da
tree5b8edabc6b1dbace4f3d6c238d57b22b37227bb4
parent5696e4aaabf2a6bae0fe8b4abf17fe17c2b03beb
hwmon: (pmbus/adm1275) support PMBUS_VIRT_*_SAMPLES

The device supports setting the number of samples for averaging the
measurements. There are two separate settings - PWR_AVG for averaging
PIN and VI_AVG for averaging VIN/VAUX/IOUT, both being part of
PMON_CONFIG register. The values are stored as exponent of base 2 of the
actual number of samples that will be taken.

Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
[groeck: Dropped unused variables]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/adm1275.c