* [PATCH] dt-bindings: dma: uniphier: Use unevaluatedProperties
@ 2022-04-07 7:44 Kunihiko Hayashi
2022-04-07 18:59 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Kunihiko Hayashi @ 2022-04-07 7:44 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski
Cc: Masami Hiramatsu, dmaengine, devicetree, linux-arm-kernel,
linux-kernel, Kunihiko Hayashi
This refers common bindings, so this is preferred for
unevaluatedProperties instead of additionalProperties.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
.../devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml | 2 +-
.../devicetree/bindings/dma/socionext,uniphier-xdmac.yaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml b/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
index e7bf6dd7da29..b40f247e07be 100644
--- a/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
+++ b/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
@@ -45,7 +45,7 @@ required:
- clocks
- '#dma-cells'
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml b/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
index 371f18773198..b2bd21cbeb7f 100644
--- a/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
+++ b/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
@@ -40,7 +40,7 @@ properties:
minimum: 1
maximum: 16
-additionalProperties: false
+unevaluatedProperties: false
required:
- compatible
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: dma: uniphier: Use unevaluatedProperties
2022-04-07 7:44 [PATCH] dt-bindings: dma: uniphier: Use unevaluatedProperties Kunihiko Hayashi
@ 2022-04-07 18:59 ` Rob Herring
2022-04-08 16:13 ` Kunihiko Hayashi
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2022-04-07 18:59 UTC (permalink / raw)
To: Kunihiko Hayashi
Cc: Vinod Koul, Krzysztof Kozlowski, Masami Hiramatsu, dmaengine,
devicetree, linux-arm-kernel, linux-kernel
On Thu, Apr 07, 2022 at 04:44:07PM +0900, Kunihiko Hayashi wrote:
> This refers common bindings, so this is preferred for
> unevaluatedProperties instead of additionalProperties.
Yes and no. If you want to define specific common properties are used
(and not used), then listing them in the specific schema with
'additionalProperties' is the right way to do that. If all properties in
the referenced schema are valid, then unevaluatedProperties is correct.
If we wanted using unevaluatedProperties to be a hard rule, we could
make the meta-schema enforce that.
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
> .../devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml | 2 +-
> .../devicetree/bindings/dma/socionext,uniphier-xdmac.yaml | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml b/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
> index e7bf6dd7da29..b40f247e07be 100644
> --- a/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
> +++ b/Documentation/devicetree/bindings/dma/socionext,uniphier-mio-dmac.yaml
> @@ -45,7 +45,7 @@ required:
> - clocks
> - '#dma-cells'
>
> -additionalProperties: false
> +unevaluatedProperties: false
>
> examples:
> - |
> diff --git a/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml b/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
> index 371f18773198..b2bd21cbeb7f 100644
> --- a/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
> +++ b/Documentation/devicetree/bindings/dma/socionext,uniphier-xdmac.yaml
> @@ -40,7 +40,7 @@ properties:
> minimum: 1
> maximum: 16
>
> -additionalProperties: false
> +unevaluatedProperties: false
>
> required:
> - compatible
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: dma: uniphier: Use unevaluatedProperties
2022-04-07 18:59 ` Rob Herring
@ 2022-04-08 16:13 ` Kunihiko Hayashi
0 siblings, 0 replies; 3+ messages in thread
From: Kunihiko Hayashi @ 2022-04-08 16:13 UTC (permalink / raw)
To: Rob Herring
Cc: Vinod Koul, Krzysztof Kozlowski, Masami Hiramatsu, dmaengine,
devicetree, linux-arm-kernel, linux-kernel
Hi Rob,
On 2022/04/08 3:59, Rob Herring wrote:
> On Thu, Apr 07, 2022 at 04:44:07PM +0900, Kunihiko Hayashi wrote:
>> This refers common bindings, so this is preferred for
>> unevaluatedProperties instead of additionalProperties.
>
> Yes and no. If you want to define specific common properties are used
> (and not used), then listing them in the specific schema with
> 'additionalProperties' is the right way to do that. If all properties in
> the referenced schema are valid, then unevaluatedProperties is correct.
I understand that having a reference to a common schema isn't a direct reason
to replace with unevaluatedProperties because it depends on how each property
of the common schema is handled in this schema.
Since there is no property to evaluate with "if" etc., I think that it can
be left as "additionalProperties" in this schema.
I withdraw this patch.
> If we wanted using unevaluatedProperties to be a hard rule, we could
> make the meta-schema enforce that.
At the moment it is difficult to decide it to be a hard rule.
Thank you,
---
Best Regards
Kunihiko Hayashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-08 16:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 7:44 [PATCH] dt-bindings: dma: uniphier: Use unevaluatedProperties Kunihiko Hayashi
2022-04-07 18:59 ` Rob Herring
2022-04-08 16:13 ` Kunihiko Hayashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).