Re: [PATCH 2/2] iio: temperature: ltc2983: Add support for ADT7604

From: Andy Shevchenko

Date: Fri May 08 2026 - 03:44:23 EST


On Thu, May 07, 2026 at 03:31:14PM +0000, Stan, Liviu wrote:
> On Mon, Apr 27, 2026 Andy Shevchenko wrote:

...

> > > + bool sub_ohm;
> >
> > What does this mean? Perhaps rename to is_in_milliohms or something like
> > that?
>
> The datasheet describes two cases for the copper trace sensor type: < 1ohm and > 1
> ohm copper traces. The difference between the two is that < 1 ohm copper traces
> have bits 17:0 zeroed (excitation current and custom sensor data pointer configuration
> bits). For > 1 ohm copper traces an excitation current needs to be specified and the
> custom table bits are optional. "Sub_ohm" reflects the selection of the sub-ohm variant,
> not the result units. For me "sub_ohm" or "is_sub_ohm" feels more in relation to the
> datasheet, but if something like "is_in_milliohms" feels more understandable to you I can
> change it in v2.

So, this needs a good comment. And is_sub_ohm is definitely better.

...

> > chann? Perhaps just "chan"?
>
> This, also, was present in the original code, the error messages I introduced
> for leak detector and copper trace follow the same pattern though. Should I
> modify it everywhere?

Maybe the idea was to represent 'chan<N>'? Either way, the current message is
unclear, please add a preparatory patch that fixes that ambiguity and use the
same pattern in your new code.

--
With Best Regards,
Andy Shevchenko