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>
This commit is contained in:
Adamski, Krzysztof (Nokia - PL/Wroclaw) 2019-05-29 14:36:21 +00:00 • committed by Guenter Roeck
commit c83529c17e