From: sashiko-bot@kernel.org
To: "Pramod Maurya" <pramod.nexgen@gmail.com>
Cc: krzk+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: iio: adc: Convert xilinx-xadc bindings to YAML schema
Date: Sat, 09 May 2026 17:52:31 +0000 [thread overview]
Message-ID: <20260509175232.4E78BC2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260509171453.45844-1-pramod.nexgen@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Incorrect regex for `patternProperties` matching channel unit addresses (expects decimal instead of hex).
- [Medium] Missing conditional schema validation for `xlnx,external-mux-channel`.
--
commit 9cb917c448e17a8e4cd03c2b0f448fe1debfc5c0
Author: Pramod Maurya <pramod.nexgen@gmail.com>
dt-bindings: iio: adc: Convert xilinx-xadc bindings to YAML schema
This commit converts the Xilinx XADC and UltraScale System Monitor device
tree binding from the legacy plain-text format to a YAML schema, enabling
automated validation with dt-schema.
> diff --git a/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
> new file mode 100644
> index 0000000000000..86bdc4920cdbf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
> @@ -0,0 +1,191 @@
[ ... ]
> + xlnx,external-mux:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: |
> + Selects the external multiplexer mode.
> + enum:
> + - none
> + - single
> + - dual
> +
> + xlnx,external-mux-channel:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: |
> + Configures which pair of pins is used to sample data in external
> + multiplexer mode. This property is required when the device is
> + configured for external multiplexer mode.
The description mentions this property is required when the device is
configured for external multiplexer mode (e.g., when xlnx,external-mux is
set to "single" or "dual").
Should the schema enforce this dynamically using an allOf -> if/then block?
Without conditional enforcement, device trees that enable the external
multiplexer but omit the required channel configuration might silently pass
automated dt-schema validation.
[ ... ]
> + xlnx,channels:
> + type: object
> + description:
> + List of external channels connected to the ADC. If this property is
> + absent, no external channels are assumed to be connected.
> +
> + properties:
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + patternProperties:
> + "^channel@([0-9]|1[0-6])$":
> + type: object
> + description:
Device tree unit addresses must be formatted as lowercase hexadecimal.
A reg value of 10-15 corresponds to the unit addresses @a through @f.
Does this regex expect decimal numbers instead? If so, it might incorrectly
reject valid hexadecimal unit addresses like channel@a through channel@f,
and erroneously allow channel@16 (which corresponds to a reg of 22).
Should this regex be updated to match hex values instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260509171453.45844-1-pramod.nexgen@gmail.com?part=1
prev parent reply other threads:[~2026-05-09 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 17:14 [PATCH] dt-bindings: iio: adc: Convert xilinx-xadc bindings to YAML schema Pramod Maurya
2026-05-09 17:52 ` sashiko-bot [this message]
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=20260509175232.4E78BC2BCB2@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=pramod.nexgen@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.