All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: example-schema: Show example of dependentRequired
Date: Wed, 11 Nov 2026 11:21:07 -0600	[thread overview]
Message-ID: <20261111172107.GA3839021-robh@kernel.org> (raw)
In-Reply-To: <20261111111403.83665-2-krzysztof.kozlowski@oss.qualcomm.com>

On Wed, Nov 11, 2026 at 12:14:04PM +0100, Krzysztof Kozlowski wrote:
> dependentRequired is shorter and preferred form of conditional property
> requirement, over allOf:if:then: block, so document example usage.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> 
> ---
> 
> Changes in v2:
> 1. Use clocks/clock-names in the dependentRequired, to avoid conflict
>    with existing foo-supply constraint.
> ---
>  Documentation/devicetree/bindings/example-schema.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml
> index b04f3cc4312c..a37d10ff7469 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:

Update 'dependencies' instead. We can drop 'dependencies' for 
dependentRequired. Would be good to add a dependentSchemas too though we 
don't use that too much.

Rob

  parent reply	other threads:[~2026-11-11 17:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 11:14 [PATCH v2] dt-bindings: example-schema: Show example of dependentRequired Krzysztof Kozlowski
2026-11-11 11:26 ` sashiko-bot
2026-11-11 17:21 ` Rob Herring [this message]
2026-11-11 18:16   ` 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=20261111172107.GA3839021-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.