Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pramod Maurya" <pramod.nexgen@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Subject: Re: [PATCH v2] dt-bindings: iio: adc: Convert xilinx-xadc bindings to YAML schema
Date: Sat, 09 May 2026 18:33:01 +0000	[thread overview]
Message-ID: <20260509183301.B7140C2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260509180719.53704-1-pramod.nexgen@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Invalid `minimum` and `maximum` constraints applied directly to the `reg` property in `channel@...` subnodes.
--

commit 5043f94915e880a0ca171308ea2b8d199810b756
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. The
new binding covers the ZYNQ hardmacro, AXI softmacro, and UltraScale System
Management Wizard.

> 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..cfe753e3e8d19
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml

[ ... ]

> +    patternProperties:
> +      "^channel@([0-9a-f]|10)$":
> +        type: object
> +        description:
> +          Represents an external channel connected to the ADC.
> +
> +        properties:
> +          reg:
> +            description: |
> +              Pair of pins the channel is connected to.
> +                0: VP/VN
> +                1: VAUXP[0]/VAUXN[0]
> +                2: VAUXP[1]/VAUXN[1]
> +                ...
> +                16: VAUXP[15]/VAUXN[15]
> +            minimum: 0
> +            maximum: 16

Will these constraints work correctly on the reg property?

In dt-schema, the reg property is intrinsically defined as a uint32-matrix
array type. According to the JSON Schema specification, the minimum and
maximum validation keywords apply exclusively to numeric types, not arrays.

Placing these keywords directly on the reg property may trigger a
meta-schema violation during dt_binding_check or be silently ignored,
allowing out-of-bounds configurations to pass validation.

Should this use maxItems: 1 with the numeric bounds placed inside items,
such as items: [ { minimum: 0, maximum: 16 } ] instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260509180719.53704-1-pramod.nexgen@gmail.com?part=1

  reply	other threads:[~2026-05-09 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 18:07 [PATCH v2] dt-bindings: iio: adc: Convert xilinx-xadc bindings to YAML schema Pramod Maurya
2026-05-09 18:33 ` sashiko-bot [this message]
2026-05-09 19:24 ` Rob Herring (Arm)

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=20260509183301.B7140C2BCB2@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox