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

From: Stan, Liviu

Date: Mon May 11 2026 - 04:20:44 EST


On Fri, 8 May 2026, Nuno Sá wrote:
> > > > A leak detector is a sensor like the raindrop detection modules, whose
> > > > resistance decreases as more of its surface is contacted by liquid. In this
> > > > case, for example, if half of the sensor's surface is in contact
> > > > with a liquid, the ADT7604 should, with an appropiate user-provided
> > > > resistance-vs-coverage table, report 50% coverage in the IIO channel.
> > >
> > > And, AFAIU, depending on the coverage the resistance changes and that's
> > > how we get into the indirect temperature variations?
> >
> > If I understand your comment correctly, you're implying that there are
> > indirect temperature variations caused by resistance changes, and
> > that's what the chip is measuring? The chip does not measure any actual
> > temperature for this sensor type, the value in the temperature result
> > register bank is solely a result of the chip's interpolation of the
> > user-defined custom table.
>
> I meant that's what the table is trying to accomplish? That's why I kind
> of put it as "indirect". My understanding was the chip does not measure
> any temperature as well.

Oh, okay, I understand now. Yes, this is what the table is trying to accomplish.

On Sat, 9 May 2026, Jonathan Cameron wrote:
> > I meant that's what the table is trying to accomplish? That's why I kind
> > of put it as "indirect". My understanding was the chip does not measure
> > any temperature as well.
> >
> 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?

Thanks,
Liviu