Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "David Lechner (TI)" <dlechner@baylibre.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 5/8] dt-bindings: iio: adc: add ti,ads122c14
Date: Tue, 14 Jul 2026 23:43:43 +0000	[thread overview]
Message-ID: <20260714234343.F2E5A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714-iio-adc-ti-ads122c14-v4-5-25f8e3084485@baylibre.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Flawed conditional validation for `clocks` and `/DRDY` mutual exclusivity
- [Medium] Missing Required Properties for Provider Capabilities
- [Low] Inconsistent Validation Constraints for `interrupt-names`
--

--- Patch [5]: [PATCH v4 5/8] dt-bindings: iio: adc: add ti,ads122c14 ---
commit 8ec99dd88682486b85d4fece20ce3719cbf6082e
Author: David Lechner (TI) <dlechner@baylibre.com>

dt-bindings: iio: adc: add ti,ads122c14

Add new bindings for ti,ads122c14 and similar devices primarily intended
for use with resistive sensors. The bindings include special properties for
reference voltage sources and current outputs for each measurement channel.

> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads112c14.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads112c14.yaml
> new file mode 100644
> index 0000000000000..b11359c9955e6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads112c14.yaml

[ ... ]

> +  interrupts:
> +    minItems: 1
> +    items:
> +      - description: /FAULT interrupt (GPIO2 pin)
> +      - description: /DRDY interrupt (GPIO3 pin)
> +
> +  interrupt-names:
> +    minItems: 1
> +    maxItems: 2
> +    items:
> +      enum: [fault, drdy]

[Severity: Low]
The interrupts property defines a strict positional ordering where the first
item is /FAULT and the second is /DRDY. Does using an unordered enum for
interrupt-names allow the names to be supplied out of order, which would
conflict with the strict ordering of the actual interrupts?

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - avdd-supply
> +  - dvdd-supply

[Severity: Medium]
Since this hardware acts as a GPIO controller (defining gpio-controller and
#gpio-cells), should these properties be included in the required list to
ensure incomplete device tree nodes do not pass validation?

[ ... ]

> +# /DRDY out and CLK in use the same AIN7/GPIO3 pin.
> +if:
> +  properties:
> +    interrupt-names:
> +      contains:
> +        const: drdy
> +then:
> +  properties:
> +    clocks: false

[Severity: Medium]
Will this conditional incorrectly evaluate to true when the interrupt-names
property is completely omitted?

Due to JSON Schema semantics, missing properties trivially pass the check.
This might incorrectly forbid clocks for valid configurations that only use
the /FAULT interrupt but omit interrupt-names entirely.

Also, is it possible to bypass this check by supplying two items in the
interrupts array while only defining interrupt-names as ["fault"]?

Would checking the length of the interrupts array be a more robust way to
enforce this exclusivity?

[ ... ]

> +examples:
> +  - |
> +    i2c {

[Severity: Medium]
If the GPIO controller properties are required for this device to function
as a provider, do they also need to be demonstrated in these examples to
successfully pass dt_binding_check?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260714-iio-adc-ti-ads122c14-v4-0-25f8e3084485@baylibre.com?part=5

  reply	other threads:[~2026-07-14 23:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 23:21 [PATCH v4 0/8] iio: adc: new ti-ads112c14 driver David Lechner
2026-07-14 23:21 ` [PATCH v4 1/8] dt-bindings: iio: adc: Add reference-sources property David Lechner
2026-07-14 23:21 ` [PATCH v4 2/8] dt-bindings: iio: adc: Add excitation current sources properties David Lechner
2026-07-14 23:21 ` [PATCH v4 3/8] dt-bindings: iio: adc: Add burn-out current properties David Lechner
2026-07-14 23:21 ` [PATCH v4 4/8] dt-bindings: iio: adc: add input-chopping property David Lechner (TI)
2026-07-14 23:21 ` [PATCH v4 5/8] dt-bindings: iio: adc: add ti,ads122c14 David Lechner (TI)
2026-07-14 23:43   ` sashiko-bot [this message]
2026-07-15  0:16   ` David Lechner
2026-07-14 23:21 ` [PATCH v4 6/8] iio: adc: add ti-ads112c14 driver David Lechner (TI)
2026-07-14 23:43   ` sashiko-bot
2026-07-14 23:21 ` [PATCH v4 7/8] iio: adc: ti-ads112c14: implement gain on internal short SYS_MON channel David Lechner (TI)
2026-07-14 23:21 ` [PATCH v4 8/8] iio: adc: ti-ads112c14: add measurement channel support David Lechner (TI)
2026-07-15  0:05   ` sashiko-bot

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=20260714234343.F2E5A1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.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