Devicetree
 help / color / mirror / Atom feed
From: Liviu Stan <liviu.stan@analog.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Liviu Stan" <liviu.stan@analog.com>,
	"Francesco Lavra" <flavra@baylibre.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux@analog.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 7/8] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
Date: Fri, 22 May 2026 14:42:53 +0300	[thread overview]
Message-ID: <20260522114259.841-1-liviu.stan@analog.com> (raw)
In-Reply-To: <20260521182308.4E2731F000E9@smtp.kernel.org>

On Thu, 21 May 2026 18:23:07 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] The new compatible string 'adi,adt7604' is omitted from the existing conditional block that disables '^temp@' nodes, violating subsystem guidelines.
> - [Low] The schema allows invalid 'adi,sensor-type' values in '^rtd@' and '^thermistor@' nodes for the ADT7604.
> --
> 
> commit fbbcd3bcbfbb106e48a6545868dd2b27a56b39b5
> Author: Liviu Stan <liviu.stan@analog.com>
> 
> dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
> 
> This commit adds support for the ADT7604 to the LTC2983 binding schema. It
> introduces the adi,adt7604 compatible string and adds two new sensor node
> types: copper-trace@ and leak-detector@. It also adds conditional checks to
> restrict unsupported nodes for the ADT7604 device.
> 
> > diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
> > index a22725f7619b7..14cfa28809edd 100644
> > --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
> > +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
> [ ... ]
> > @@ -477,6 +597,22 @@ allOf:
> >        patternProperties:
> >          '^temp@': false
> >  
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: adi,adt7604
> > +    then:
> > +      patternProperties:
> > +        '^thermocouple@': false
> > +        '^diode@': false
> > +        '^adc@': false
> > +        '^temp@': false
> 
> [Severity: Low]
> Since ADT7604 shares the ^temp@: false constraint with the existing devices,
> should adi,adt7604 be added to the existing compatible enum block instead of
> duplicating the ^temp@ restriction in this new conditional?

I think keeping all ADT7604 related constraints in one block is more readable.
For the block above it's different because ltc2984 and ltc2983 share the same
constraints.

> 
> [Severity: Low]
> The commit message mentions that ADT7604 repurposes the custom RTD sensor type
> (18) and custom thermistor type (27).
> 
> However, the schema doesn't restrict adi,sensor-type = <18> inside ^rtd@ nodes
> or adi,sensor-type = <27> inside ^thermistor@ nodes for the adi,adt7604
> compatible.
> 
> Should these restrictions be added to this block to prevent invalid device
> tree configurations from passing validation?
> 

This makes sense, we could restrict sensor type 18 and 27 for the ADT7604, even
though the driver's supported_sensors bitmask already rejects them.

I could add something like:

- if:
    properties:
      compatible:
        contains:
          const: adi,adt7604
  then:
    patternProperties:
      '^thermocouple@': false
      '^diode@': false
      '^adc@': false
      '^temp@': false
      '^rtd@':
        properties:
          adi,sensor-type:
            not:
              const: 18
      '^thermistor@':
        properties:
          adi,sensor-type:
            not:
              const: 27

What do you think?

Thanks,
Liviu

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

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 16:42 [PATCH v3 0/8] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-05-21 16:42 ` [PATCH v3 1/8] iio: temperature: ltc2983: Fix macro parenthesization and rename Liviu Stan
2026-05-22  9:11   ` Joshua Crofts
2026-05-22 12:56     ` Jonathan Cameron
2026-05-21 16:42 ` [PATCH v3 2/8] iio: temperature: ltc2983: Use local device pointer consistently Liviu Stan
2026-05-22  7:37   ` Joshua Crofts
2026-05-22 13:02   ` Jonathan Cameron
2026-05-22 13:56     ` Stan, Liviu
2026-06-02 23:19   ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 3/8] iio: temperature: ltc2983: Fix inconsistent channel wording in messages Liviu Stan
2026-05-22  7:07   ` Joshua Crofts
2026-06-02 23:21   ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 4/8] iio: temperature: ltc2983: Use fwnode_property_present() for optional properties Liviu Stan
2026-06-02 23:23   ` Andy Shevchenko
2026-05-21 16:42 ` [PATCH v3 5/8] iio: temperature: ltc2983: Fix n_wires default bypassing rotation check Liviu Stan
2026-05-22 13:06   ` Jonathan Cameron
2026-05-21 16:42 ` [PATCH v3 6/8] iio: core: Add IIO_COVERAGE channel type Liviu Stan
2026-05-21 18:10   ` sashiko-bot
2026-05-22  9:57   ` Stan, Liviu
2026-05-21 16:43 ` [PATCH v3 7/8] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983 Liviu Stan
2026-05-21 18:23   ` sashiko-bot
2026-05-22 11:42     ` Liviu Stan [this message]
2026-05-22 13:17       ` Jonathan Cameron
2026-05-21 16:43 ` [PATCH v3 8/8] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-05-21 19:18   ` sashiko-bot
2026-05-22 13:23     ` Liviu Stan
2026-05-22 14:09       ` David Lechner
2026-05-22 13:34   ` Jonathan Cameron
2026-05-22 14:24     ` Stan, Liviu
2026-05-22 17:31       ` Jonathan Cameron

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=20260522114259.841-1-liviu.stan@analog.com \
    --to=liviu.stan@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=flavra@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=nuno.sa@analog.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