From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>,
devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: example-schema: Show example of dependentRequired
Date: Wed, 11 Nov 2026 09:14:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-208675@kernel.org> (raw)
In-Reply-To: <20261111090449.53511-2-krzysztof.kozlowski@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dt-bindings: example-schema: conflicting and duplicate
dependentRequired example
--
commit a3f4513191420436a3b3975020d020b961833f59
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dt-bindings: example-schema: Show example of dependentRequired
This commit adds a dependentRequired example to example-schema.yaml to
document the preferred way to express conditional property requirements.
> diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml
> index b04f3cc4312c0..0c78eda67a2e6 100644
> --- a/Documentation/devicetree/bindings/example-schema.yaml
> +++ b/Documentation/devicetree/bindings/example-schema.yaml
> @@ -217,6 +217,14 @@ required:
> - interrupts
> - interrupt-controller
>
> +# Properties might be required only if some other property is present.
> +# dependentRequired is a shorter and preferred way to express this, instead of
> +# if:then: block.
> +dependentRequired:
> + # foo-gpios is not a required property, but if present, then foo-supply must
> + # be provided as well.
> + foo-gpios: [ foo-supply ]
[Severity: Low]
Does requiring foo-supply when foo-gpios is present conflict with the allOf
conditional block right below?
Documentation/devicetree/bindings/example-schema.yaml:allOf:
then:
required:
- foo-supply
else:
# If otherwise the property is not allowed:
properties:
foo-supply: false
That block already makes foo-supply unconditionally required on
vendor,soc2-ip and forbids foo-supply on all other compatibles, which makes
it impossible to specify foo-gpios on any compatible other than
vendor,soc2-ip.
Also, should this replace the existing dependencies block just above
required (and the comment in allOf referring to dependencies) rather than
leaving two top-level keywords in the example schema that demonstrate the
same construct?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111090449.53511-2-krzysztof.kozlowski@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-11-11 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 9:04 [PATCH] dt-bindings: example-schema: Show example of dependentRequired Krzysztof Kozlowski
2026-11-11 9:14 ` sashiko-bot [this message]
2026-11-11 11:08 ` 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=sashiko-outbox-208675@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.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