From: sashiko-bot@kernel.org
To: "Omer PALA" <palaomer100@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: iio: adc: Add dt binding to xlnx,xadc
Date: Fri, 18 Sep 2026 17:53:55 +0000 [thread overview]
Message-ID: <20260918175356.4D0F51F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918174413.17155-1-palaomer100@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: conflicting constraints when xlnx,external-mux is omitted
--
commit 406270de35d17021a1ddb6e41307e55905cede41
Author: Omer PALA <palaomer100@gmail.com>
dt-bindings: iio: adc: Add dt binding to xlnx,xadc
This commit converts the xilinx-xadc.txt device tree binding into a YAML
schema. It defines constraints for xlnx,zynq-xadc-1.00.a,
xlnx,axi-xadc-1.00.a, and xlnx,system-management-wiz-1.3 bindings.
> 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..f9b717c297158
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/xlnx,xadc.yaml
[ ... ]
> +allOf:
> + - if:
> + properties:
> + xlnx,external-mux:
> + const: none
[Severity: Medium]
Will this if block evaluate to true when xlnx,external-mux is omitted?
In JSON Schema, an if block checking a const on a property evaluates
to true if that property is absent. Does this block need a
required: [xlnx,external-mux] constraint inside the if to prevent
it from silently succeeding when the property is not provided?
> + then:
> + properties:
> + xlnx,external-mux-channel: false
> +
> + - if:
> + properties:
> + xlnx,external-mux:
> + const: single
[Severity: Medium]
Does this if block also evaluate to true when xlnx,external-mux is
omitted because it lacks the same required constraint?
> + then:
> + properties:
> + xlnx,external-mux-channel:
> + minimum: 0
> + maximum: 16
> + required:
> + - xlnx,external-mux-channel
> +
> + - if:
> + properties:
> + xlnx,external-mux:
> + const: dual
[Severity: Medium]
When the xlnx,external-mux property is omitted, doesn't this if also
evaluate to true, piling on a contradictory requirement for
xlnx,external-mux-channel?
Since xlnx,external-mux is an optional property, omitting it causes the
schema to simultaneously require xlnx,external-mux-channel (from here and
the 'single' block) and explicitly forbid it via false (from the 'none'
block).
This creates an impossible constraint that rejects valid device trees using
the default mux configuration. Could adding required: [xlnx,external-mux]
to each if clause fix this underlying conditional logic issue?
> + then:
> + properties:
> + xlnx,external-mux-channel:
> + minimum: 1
> + maximum: 8
> + required:
> + - xlnx,external-mux-channel
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918174413.17155-1-palaomer100@gmail.com?part=1
next prev parent reply other threads:[~2026-09-18 17:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 17:44 [PATCH v2] dt-bindings: iio: adc: Add dt binding to xlnx,xadc Omer PALA
2026-09-18 17:53 ` sashiko-bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-18 14:58 [PATCH] " Omer PALA
2026-09-18 17:48 ` [PATCH v2] " Omer PALA
2026-09-18 18:02 ` sashiko-bot
2026-09-19 7:32 ` Krzysztof Kozlowski
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=20260918175356.4D0F51F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=palaomer100@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