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: Tue, 12 May 2026 16:56:54 +0100 [thread overview]
Message-ID: <20260512165654.5adeba0f@jic23-huawei> (raw)
In-Reply-To: <SA5PR03MB83776E4DF7B5542B40C3B925F6392@SA5PR03MB8377.namprd03.prod.outlook.com>
On Tue, 12 May 2026 12:26:02 +0000
"Stan, Liviu" <Liviu.Stan@analog.com> wrote:
> On Tue, May 12, 2026, Nuno Sá wrote:
> > > > 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.
> > >
> > > I still think a new channel type is the right approach. Consider copper
> > > trace sensors - they also support a custom table, and when one is
> > > provided the chip outputs both a resistance result and a temperature
> > > result (the interpolation output), each in their own register bank. The
> > > current approach handles that with separate IIO_RESISTANCE and
> > > IIO_TEMP channels. So, for consistency, if we use a chan_info
> > > attribute for the leak detector coverage output, we would need to do
> > > the same for the copper trace temperature output. Since IIO_TEMP
> > > makes sense for the interpolation result for copper traces and
> > > because it is a distinct physical quantity output by the chip, I think it
> > > would make the most sense that leak detectors follow the same
> > > pattern and create a separate IIO channel.
> > >
> > > What do you think?
> > >
> >
> > Yeah, makes sense. Jonathan already put it very nicely for the distinct
> > channel case.
>
> Sorry, I saw the last two messages only after I sent my reply.
>
> On Tue, May 12, 2026, Jonathan Cameron wrote:
> > > 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
> >
> > I'm perhaps missing something - as far as I understand it there is no meaningful
> > connection to resistance in what is being measured.
> > I think what you are proposing is similar to measuring current via voltage
> > drop over a sense resistor. We don't present that as modified voltage, we
> > present it as current.
> >
> > Here the thing being measured is coverage rather than resistance
> > so keeping resistance in there is confusing for the user.
> >
> > If we wanted a type to modify then we could do this as a modified area measurement.
> > Channel type IIO_AREA (which is new) and modifier IIO_MOD_RATIO (also new).
>
> On the implementation: you originally suggested IIO_COVERAGE_PERCENT,
> which would give in_coveragepercent0_raw in sysfs. The IIO_AREA + IIO_MOD_RATIO
> alternative would give in_area0_ratio_raw, which is more generic but less
> immediately obvious for a leak detector. Do you have a preference
> between the two?
I wonder what other reasonable area sensors we'll get in future?
Maybe more specific is better here - like humidityrelative (we've never had
an absolute humidity sensor because they are really hard to build!)
Jonathan
>
> Thanks,
> Liviu
>
next prev parent reply other threads:[~2026-05-12 15:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 13:25 [PATCH 0/2] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-04-27 13:25 ` [PATCH 1/2] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983 Liviu Stan
2026-04-27 19:34 ` Conor Dooley
2026-05-06 13:06 ` Stan, Liviu
2026-05-06 17:26 ` Conor Dooley
2026-05-07 8:53 ` Stan, Liviu
2026-04-28 14:58 ` Jonathan Cameron
2026-05-06 14:52 ` Stan, Liviu
2026-05-07 10:35 ` Jonathan Cameron
2026-04-27 13:25 ` [PATCH 2/2] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-04-27 18:23 ` Andy Shevchenko
2026-05-07 15:31 ` Stan, Liviu
2026-05-08 7:44 ` Andy Shevchenko
2026-05-12 7:12 ` Stan, Liviu
2026-05-12 7:57 ` Andy Shevchenko
2026-05-12 9:37 ` Stan, Liviu
2026-05-12 16:25 ` Andy Shevchenko
2026-04-28 11:14 ` Nuno Sá
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
2026-05-11 12:02 ` Stan, Liviu
2026-05-12 8:24 ` Nuno Sá
2026-05-12 10:55 ` Jonathan Cameron
2026-05-12 11:06 ` Nuno Sá
2026-05-12 11:55 ` Stan, Liviu
2026-05-12 12:06 ` Nuno Sá
2026-05-12 12:26 ` Stan, Liviu
2026-05-12 15:56 ` Jonathan Cameron [this message]
2026-05-13 16:08 ` 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=20260512165654.5adeba0f@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.