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

From: Nuno Sá

Date: Tue May 12 2026 - 04:29:03 EST


On Mon, May 11, 2026 at 12:02:31PM +0000, Stan, Liviu wrote:
> On Mon, 11 May 2026 Jonathan Cameron wrote:
> > > > Ok. So what are our options here? Present it as simple resistance and leave
> > > > userspace to figure it out or add a new channel type? To me feels like new
> > > > channel type makes sense.
> > >
> > > The current approach presents it as IIO_TEMP since the chip outputs coverage
> > > (using the custom table interpolation) via the temperature result bank, not
> > > the resistance bank, but I agree a new channel type makes sense. Should I
> > > create a specific type like IIO_COVERAGE_PERCENT or would a general
> > > IIO_PERCENTAGE be better?
> >
> > For ABI purposes we don't care where it comes from.
> >
> > We already have some 'ratio' type measurements like concentration which are
> > percentages and similar to those I think we need some indication of 'what'
> > is being measured given it's unit free. Hence IIO_COVERAGE_PERCENT seems
> > the better choice to me.
>
> Understood. Will do that in v2.

I do wonder if a complete type is what we want? How will we present it?

in_coverage_ratio?

What I'm not too convinced is that coverage is relative to what? Well
it's a percentage so I guess we could not care and leave interpretation to
userspace (to know which device is dealing with). Still I wonder if a
new iio_chan_info wouldn't be more appropriate? In this case applied to
iio_resistance. So something like:

in_resistance_coverage_ratio

So it's clear what physical quantity coverage ratio is affecting.

Thoughts?
- Nuno Sá

>
> Thank you!
>
> Liviu