Re: [PATCH v3 7/8] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
From: Liviu Stan
Date: Fri May 22 2026 - 07:44:00 EST
On Thu, 21 May 2026 18:23:07 +0000 sashiko-bot@xxxxxxxxxx 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@xxxxxxxxxx>
>
> 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