Re: [PATCH] hwmon: (ina3221) Add summation feature support

From: Nicolin Chen
Date: Mon Oct 21 2019 - 04:12:20 EST


On Sun, Oct 20, 2019 at 09:36:28AM -0700, Guenter Roeck wrote:
> On Wed, Oct 16, 2019 at 04:57:02PM -0700, Nicolin Chen wrote:
> > 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 <nicoleotsuka@xxxxxxxxx>
> > ---
> >
> > Hi Guenter,
> >
> > I know my previous questions haven't been answered yet, so nodes
> > for enabling bits aren't decided completely. But this patch only
> > adds voltage and its current, and we had a conclusion for these
> > two already last time. So I think we may add them first. Thanks!
> >
>
> I don't really like the term "summation", as it is the process of
> summing things up, not the result. I'll change "summation of" in
> the documentation to "sum of" and apply the patch.

Thank you!