Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Quchaosheng <quchaosheng000406@163.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH] dt-bindings: iio: adc: xlnx,xadc: Convert to DT schema
Date: Mon, 14 Sep 2026 03:08:33 +0000	[thread overview]
Message-ID: <20260914030833.925041F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914030226.437638-1-quchaosheng000406@163.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Missing `required` constraints for `#address-cells` and `#size-cells` under the `xlnx,channels` node.
- [Medium] The `xlnx,external-mux-channel` property is not conditionally required in the schema when `xlnx,external-mux` is configured.
--

commit 26fef0c106376ac6892ddac0175e6b4bb799f5f4
Author: Quchaosheng <quchaosheng000406@163.com>

dt-bindings: iio: adc: xlnx,xadc: Convert to DT schema

This commit converts the Xilinx XADC and System Monitor bindings from
free-form text to DT schema format. The xlnx,channels container and external
channels are now described as a nested object to validate them.

> diff --git a/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
[ ... ]
> +  xlnx,external-mux:
> +    description:
> +      External multiplexer mode. When omitted no external multiplexer is
> +      assumed to be used.
> +    enum: [none, single, dual]
> +    default: none
> +
> +  xlnx,external-mux-channel:
> +    description:
> +      Which pair of pins is used to sample data in external multiplexer mode.
> +      In single mode the valid range is 0 to 16, in dual mode 1 to 8. This
> +      property is required when external multiplexer mode is used and is
> +      otherwise ignored.

[Severity: Medium]
Does this property need an allOf or if-then block to programmatically enforce
the requirement? The description mentions it is required when external
multiplexer mode is used, but the schema lacks the conditional requirement
logic. If a device tree configures xlnx,external-mux to single or dual but
omits xlnx,external-mux-channel, the schema validation will succeed, but the
driver probe will fail at runtime.

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 0
> +    maximum: 16
> +
> +  xlnx,channels:
> +    description:
> +      Container for the external channels connected to the ADC. When this
> +      node is absent no external channels are assumed to be connected.
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0

[Severity: Medium]
Are we missing a required list for these properties under the xlnx,channels
node? Incomplete device tree nodes that omit the #address-cells and
#size-cells properties will silently pass schema validation, despite
containing child nodes with unit addresses. This violates standard devicetree
semantics and fails to enforce the correct structure.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914030226.437638-1-quchaosheng000406@163.com?part=1

  reply	other threads:[~2026-09-14  3:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  3:02 [PATCH] dt-bindings: iio: adc: xlnx,xadc: Convert to DT schema Quchaosheng
2026-09-14  3:08 ` sashiko-bot [this message]
2026-09-14  3:16 ` Quchaosheng

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=20260914030833.925041F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=quchaosheng000406@163.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