Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kurt Borja" <kuurtb@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/5] dt-bindings: iio: adc: Add TI ADS126x ADC family
Date: Fri, 12 Jun 2026 22:53:03 +0000	[thread overview]
Message-ID: <20260612225303.DC8551F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260612-ads126x-v1-1-894c788d03ed@gmail.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] Missing required GPIO properties in schema and examples
- [Medium] ADC2 child node is not conditionally restricted to the ads1263 compatible string
- [Medium] Contradictory schema definition for ADC2 child nodes
- [Medium] Incorrect schema property restriction blocking standard ADC properties
--

commit 42c82a528b0caecd291df843ad4bb9b4822940a2
Author: Kurt Borja <kuurtb@gmail.com>

dt-bindings: iio: adc: Add TI ADS126x ADC family

This commit adds the devicetree bindings documentation for the TI ADS1262
and ADS1263 ADCs. It defines the main ADC schema, the properties for the
ADC channels, and includes a separate schema for the ADS1263 auxiliary ADC2.

> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1262.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1262.yaml
> new file mode 100644
> index 0000000000000..1c4fde94f6c75
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1262.yaml
> @@ -0,0 +1,308 @@

[ ... ]

> +  '#io-channel-cells':
> +    const: 1
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  gpio-controller: true
> +
> +  adc:
> +    $ref: /schemas/iio/adc/ti,ads1263-adc2.yaml#

[Severity: Medium]
The auxiliary ADC2 is only available on the ADS1263 variant, but the schema
allows the adc child node for all variants. Should an allOf block with an
if-then condition be added here or below to forbid the adc node when the
compatible string is ti,ads1262?

> +
> +required:
> +  - compatible
> +  - reg
> +  - avdd-supply
> +  - dvdd-supply
> +  - '#address-cells'
> +  - '#size-cells'

[Severity: Medium]
Since the binding provides GPIO controller capabilities, should the
gpio-controller and #gpio-cells properties be included in this required
list to ensure incomplete device tree nodes don't silently pass validation?

> +
> +unevaluatedProperties: false
> +
> +patternProperties:
> +  "^channel@[0-9]+$":
> +    $ref: /schemas/iio/adc/adc.yaml#
> +    additionalProperties: false

[Severity: Medium]
Does using additionalProperties: false here incorrectly prevent the use of
standard shared ADC channel properties from the referenced adc.yaml schema?
Should this be unevaluatedProperties: false instead to allow properties
evaluated by the referenced schema?

[ ... ]

> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@0 {
> +            compatible = "ti,ads1263";
> +            reg = <0>;
> +            spi-max-frequency = <8000000>;
> +            spi-cpha;
> +            avdd-supply = <&avdd>;
> +            dvdd-supply = <&dvdd>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            reset-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;

[Severity: Medium]
If gpio-controller and #gpio-cells are added to the required properties, do
they also need to be demonstrated in this example node to pass the
dt_binding_check validation?

[ ... ]

> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1263-adc2.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1263-adc2.yaml
> new file mode 100644
> index 0000000000000..9dd5577589b1c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1263-adc2.yaml
> @@ -0,0 +1,49 @@

[ ... ]

> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +  '#io-channel-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false

[Severity: Medium]
The #address-cells and #size-cells properties imply the node expects child
nodes, but additionalProperties: false is specified globally and forbids them.

Since the driver dynamically derives ADC2 channels from the parent node rather
than parsing children from the ADC2 node, should the cell properties
#address-cells and #size-cells be removed to avoid this contradiction?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260612-ads126x-v1-0-894c788d03ed@gmail.com?part=1

  reply	other threads:[~2026-06-12 22:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 22:46 [PATCH 0/5] iio: adc: Add TI ADS126X ADC family support Kurt Borja
2026-06-12 22:46 ` [PATCH 1/5] dt-bindings: iio: adc: Add TI ADS126x ADC family Kurt Borja
2026-06-12 22:53   ` sashiko-bot [this message]
2026-06-12 22:46 ` [PATCH 2/5] iio: adc: Add ti-ads1262 driver Kurt Borja
2026-06-12 23:01   ` sashiko-bot
2026-06-12 22:46 ` [PATCH 3/5] iio: adc: ti-ads1262: Add GPIO controller support Kurt Borja
2026-06-12 22:59   ` sashiko-bot
2026-06-12 22:46 ` [PATCH 4/5] iio: adc: ti-ads1262: Add calibration support Kurt Borja
2026-06-12 23:02   ` sashiko-bot
2026-06-12 22:46 ` [PATCH 5/5] iio: adc: Add ti-ads1263-adc2 driver Kurt Borja
2026-06-12 23:11   ` sashiko-bot
2026-06-12 23:50 ` [PATCH 0/5] iio: adc: Add TI ADS126X ADC family support David Lechner
2026-06-13  0:06   ` Kurt Borja

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=20260612225303.DC8551F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kuurtb@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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