Re: [PATCH v2] dt-bindings: example-schema: Show example of dependentRequired

From: Rob Herring

Date: Wed Nov 11 2026 - 13:03:13 EST


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@xxxxxxxxxxxxxxxx>
>
> ---
>
> 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