Thread (25 messages) 25 messages, 6 authors, 2020-07-17

Re: [PATCH v10 4/5] dt-bindings: arm-smmu: add binding for Tegra194 SMMU

From: Robin Murphy <robin.murphy@arm.com>
Date: 2020-07-13 14:10:48
Also in: linux-devicetree, linux-iommu, linux-tegra, lkml

On 2020-07-10 21:29, Krishna Reddy wrote:
Thanks Rob. One question on setting "minItems: ". Please see below.
quoted
quoted
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nvidia,tegra194-smmu
+    then:
+      properties:
+        reg:
+          minItems: 2
+          maxItems: 2
quoted
This doesn't work. The main part of the schema already said there's only
1 reg region. This part is ANDed with that, not an override. You need to add an else clause with 'maxItems: 1' and change the base schema to
{minItems: 1, maxItems: 2}.
As the earlier version of base schema doesn't have "minItems: " set, should it be set to 0 for backward compatibility?  Or can it just be omitted setting in base schema as before?
We've always needed at least 1 "reg" specifier in practice, so I don't 
think being backwards-compatible with broken DTs is a concern :)

Robin.
"else" part to set "maxItems: 1" and setting "maxItems: 2" in base schema is clear to me.


-KR
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help