All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Stan, Liviu" <Liviu.Stan@analog.com>
Cc: 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 1/2] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
Date: Thu, 7 May 2026 11:35:28 +0100	[thread overview]
Message-ID: <20260507113528.607b52bf@jic23-huawei> (raw)
In-Reply-To: <SA5PR03MB8377E2EFE0F838C0EBD70AA6F63F2@SA5PR03MB8377.namprd03.prod.outlook.com>

On Wed, 6 May 2026 14:52:04 +0000
"Stan, Liviu" <Liviu.Stan@analog.com> wrote:

> Thanks for the comments, here are my answers:
> 
> On 28 Apr 2026, Jonathan Cameron wrote:
> > I don't know much about these temp sensors, but how is this different
> > in practice from a 2-wire RTD?  Obviously one is copper and the other
> > probably much more precise platinum but does that matter to us?  
> 
> The main practical differences are:
> 
> - The primary output is IIO_RESISTANCE, read from the resistance result
>    bank (0x0060-0x00AF). This bank is marked as reserved for the other 
>    devices

That bit we can bury in the driver.

> - Sensor configuration bits 21:18 are hardcoded to 0b1001 for all
>    copper trace configurations. For the sub-ohm variant, bits 17:0 are 
>    also zeroed; a >1Ω trace will have the excitation current and an 
>    optional custom table in those bits. For the existing custom RTD and
>    thermistor types, the custom table is required by the binding. For
>    copper trace, it is optional (and forbidden for the sub-ohm variant).
>    And for leak detector as well it is optional.

So working around this would require some constraints in the binding
triggered off the compatible - but doable I think.

> - When a custom table is present, a second IIO_TEMP channel also
>    appears, reading from the temperature bank. Same dual-output
>    behavior for leak detector.

This feels like a driver detail rather than a binding one.

> 
> That said, the hardware uses the same custom RTD mode (sensor
> type 18) internally.
> 
> > I'd go with "LTC2983 and similar" for the title now as it's
> > to long. Leave the description to list amount more info.
> >
> > Alphabetical order and it might be worth thinking about switching this
> > to a bulleted list with one device per line as it'll make adding new ones
> > neater. (obviously they are already not in numeric order, so fix that too ;)  
> 
> Will do.
> 
> > Is the absences of them enough to indicate this mode?  I.e. are there other
> > modes
> > with no specified excitation mode or custom rtd table?
> > 
> > I'm trying to work out if we can map this to the existing binding for
> > custom rtd just be adding more constraints + making existing ones more
> > specific.
> > 
> > I don't mind if we can't and have to add a new child node definition but
> > I'm not yet sure that's the case.  
> 
> You're right that the absence of both properties could imply sub-ohm mode, 
> so I think we could drop the boolean. But the issue with reusing rtd@ is that 
> adi,custom-rtd is currently required for sensor-type 18, and several 
> RTD-specific properties (adi,number-of-wires, adi,rtd-curve,
> adi,rsense-share) have no meaning for copper trace and would need to be 
> forbidden (they could also be ignored in the driver). In my opinion, separate 
> nodes for both copper trace and leak detectors would make sense, but I'm 
> happy to go whichever way you prefer.

Ok. Sounds like we could do either but the different node type is cleaner.
So fair enough - go with that if the DT maintainers are happy with it.
Just make sure to lay out some of this reasoning in the commit message.
> 
> > I'd avoid describing things as xx only as that tends to become wrong fast!
> > Better to put that as a conditional only (as you have below)
> > Maybe here you can say, (some parts only) or something like that.  
> 
> Will switch to "some parts only". 
> 
> Thanks,
> Liviu


  reply	other threads:[~2026-05-07 10:35 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 [this message]
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
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=20260507113528.607b52bf@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=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.