Commit 580e9b98 authored by Potin Lai's avatar Potin Lai Committed by Greg Kroah-Hartman
Browse files

hwmon: (adm1275) Allow setting sample averaging



[ Upstream commit a3cd66d7 ]

Current driver assume PWR_AVG and VI_AVG as 1 by default, and user needs
to set sample averaging via sysfs manually.

This patch parses the properties "adi,power-sample-average" and
"adi,volt-curr-sample-average" from device tree, and setting sample
averaging during probe. Input value must be one of value in the
list [1, 2, 4, 8, 16, 32, 64, 128].

Signed-off-by: default avatarPotin Lai <potin.lai@quantatw.com>
Link: https://lore.kernel.org/r/20220302123817.27025-2-potin.lai@quantatw.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Stable-dep-of: b153a0bb ("hwmon: (pmbus/adm1275) Fix problems with temperature monitoring on ADM1272")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a3c5d148
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment