Re: [PATCH 2/4] hwmon: ina238: Add label support for voltage inputs
From: Guenter Roeck
Date: Thu Jul 17 2025 - 11:25:07 EST
On Thu, Jul 17, 2025 at 09:30:33AM +0200, Jonas Rebmann wrote:
> Hi Guenter,
>
> Thanks for the review!
>
> On 16/07/2025 17.04, Guenter Roeck wrote:
> > On 7/15/25 13:49, Jonas Rebmann wrote:
> > > The INA family of power monitors estimate power consumption based on
> > > two voltage measurements: across a shunt resistor and across the bus.
> > >
> > > Conveniently label them "Shunt Voltage" and "Bus Voltage".
> > >
> >
> > Labels are supposed to show the sensor's association with the system, not
> > the chip labeling. So this is a no-go. And, yes, apparently I have been too
> > complacent with people (mis-)using the label attributes. That doesn't make
> > it better, so don't use it as argument to support this one.
>
> As this chip measures power based on two voltage measurements, the
> measured voltage inputs must always be associated with the system in
> that way, that in1 measures the voltage on a bus and in0 over a shunt
> resistor on that bus.
>
> Otherwise the Power/Energy/Charge-Measurements will be incorrect.
>
> Do you have a suggestion on how to use the labels correctly or should I
> just drop the patch for v2?
>
Please drop it.
Guenter
> Regards,
> Jonas
>
>
> --
> Pengutronix e.K. | Jonas Rebmann |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
>