From 2057bdfb7184e9833182bf9ffcb234988f545f41 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Wed, 16 Oct 2019 16:57:02 -0700 Subject: hwmon: (ina3221) Add summation feature support This patch implements the summation feature of INA3221, mainly the SCC (enabling) and SF (warning flag) bits of MASK_ENABLE register, INA3221_SHUNT_SUM (summation of shunt voltages) register, and the INA3221_CRIT_SUM (its critical alert setting) register. Although the summation feature allows user to select which channels to be added to the result, as an initial support, this patch simply selects all channels by default, with one only condition: all shunt resistor values need to be the same. This is because the summation of current channels can be only accurately calculated, using shunt voltage sum register, if all shunt resistors are equivalent. Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20191016235702.22039-1-nicoleotsuka@gmail.com [groeck: summation->sum in documentation and label] Signed-off-by: Guenter Roeck --- Documentation/hwmon/ina3221.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Documentation/hwmon') diff --git a/Documentation/hwmon/ina3221.rst b/Documentation/hwmon/ina3221.rst index f6007ae8f4e2..297f7323b441 100644 --- a/Documentation/hwmon/ina3221.rst +++ b/Documentation/hwmon/ina3221.rst @@ -41,6 +41,18 @@ curr[123]_max Warning alert current(mA) setting, activates the average is above this value. curr[123]_max_alarm Warning alert current limit exceeded in[456]_input Shunt voltage(uV) for channels 1, 2, and 3 respectively +in7_input Sum of shunt voltage(uV) channels +in7_label Channel label for sum of shunt voltage +curr4_input Sum of current(mA) measurement channels, + (only available when all channels use the same resistor + value for their shunt resistors) +curr4_crit Critical alert current(mA) setting for sum of current + measurements, activates the corresponding alarm + when the respective current is above this value + (only effective when all channels use the same resistor + value for their shunt resistors) +curr4_crit_alarm Critical alert current limit exceeded for sum of + current measurements. samples Number of samples using in the averaging mode. Supports the list of number of samples: -- cgit v1.2.3-59-g8ed1b