Thread (29 messages) 29 messages, 2 authors, 2022-11-02
STALE1350d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 12/12] dt-bindings: mtd: Constrain the list of parsers

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2022-10-29 00:00:15
Also in: linux-arm-msm, linux-devicetree, linux-sunxi
Subsystem: memory technology devices (mtd), open firmware and flattened device tree bindings, the rest · Maintainers: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds

Parser compatibles cannot be used anywhere, and the list is limited. In
order to constrain this list, enumerate them all under the top
"partitions" subnode. New parsers will have to add their own compatible
here as well.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 Documentation/devicetree/bindings/mtd/mtd.yaml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index bddb7bdf441b..29db0b5c115e 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -27,13 +27,29 @@ properties:
   partitions:
     type: object
     properties:
+      compatible:
+        contains:
+          enum:
+            - fixed-partitions
+            - arm,arm-firmware-suite
+            - brcm,bcm4908-partitions
+            - brcm,bcm947xx-cfe-partitions
+            - nksys,ns-partitions
+            - nvmem-cells
+            - qcom,smem-part
+            - redboot-fis
+
       '#address-cells': true
+
       '#size-cells': true
 
     patternProperties:
       "partition@[0-9a-f]+":
         $ref: partitions/partition.yaml
 
+    required:
+      - compatible
+
 patternProperties:
   "@[0-9a-f]+$":
     $ref: partitions/partition.yaml
-- 
2.34.1


_______________________________________________
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