The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Stan, Liviu" <Liviu.Stan@analog.com>
Cc: "Nuno Sá" <noname.nuno@gmail.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	"Sa, Nuno" <Nuno.Sa@analog.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: temperature: ltc2983: Add support for ADT7604
Date: Mon, 11 May 2026 12:18:20 +0100	[thread overview]
Message-ID: <20260511121820.3be9e635@jic23-huawei> (raw)
In-Reply-To: <SA5PR03MB83770D945E92C40A74D9C0DAF6382@SA5PR03MB8377.namprd03.prod.outlook.com>

On Mon, 11 May 2026 07:52:17 +0000
"Stan, Liviu" <Liviu.Stan@analog.com> wrote:

> 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?

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.

Jonathan


> 
> Thanks,
> Liviu


  reply	other threads:[~2026-05-11 11:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260427132526.272716-1-liviu.stan@analog.com>
     [not found] ` <20260427132526.272716-2-liviu.stan@analog.com>
     [not found]   ` <20260427-epileptic-pendant-1df77a472793@spud>
2026-05-06 13:06     ` [PATCH 1/2] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983 Stan, Liviu
2026-05-06 17:26       ` Conor Dooley
2026-05-07  8:53         ` Stan, Liviu
     [not found]   ` <20260428155819.3b56a3fa@jic23-huawei>
2026-05-06 14:52     ` Stan, Liviu
2026-05-07 10:35       ` Jonathan Cameron
     [not found] ` <20260427132526.272716-3-liviu.stan@analog.com>
     [not found]   ` <ae-pvxKhqmkWwXdX@ashevche-desk.local>
2026-05-07 15:31     ` [PATCH 2/2] iio: temperature: ltc2983: Add support for ADT7604 Stan, Liviu
2026-05-08  7:44       ` Andy Shevchenko
     [not found]   ` <afCVtXBHIIoLlsRo@nsa>
2026-05-07 17:25     ` Stan, Liviu
2026-05-08  9:19       ` Nuno Sá
2026-05-08 11:14         ` Jonathan Cameron
2026-05-08 12:46           ` Stan, Liviu
2026-05-08 13:44             ` Nuno Sá
2026-05-08 14:48               ` Stan, Liviu
2026-05-08 16:13                 ` Nuno Sá
2026-05-09 14:46                   ` Jonathan Cameron
2026-05-11  7:52                     ` Stan, Liviu
2026-05-11 11:18                       ` Jonathan Cameron [this message]
2026-05-11 12:02                         ` Stan, Liviu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260511121820.3be9e635@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Liviu.Stan@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox