Skip to contentSkip to conversation

dt-bindings: Ensure child nodes are of type 'object'

PATCH In review Rob Herring 5 participants 5 messages Jul 15, 2019 – Jul 18, 2019

Subsystems (8)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Ensure child nodes are of type 'object'

Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions.

Cc Maxime Ripard <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Mark Brown <[email protected]>

---
Please ack. I will take this via the DT tree.

Rob

 .../devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml       | 1 +
 .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml      | 1 +
 Documentation/devicetree/bindings/mtd/nand-controller.yaml     | 1 +
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml          | 3 +++
 .../devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml       | 1 +
 .../devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml       | 1 +
 6 files changed, 8 insertions(+)
Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml +1 -0
index fc2f63860cc8..be32f087c529 100644
@@ -42,6 +42,7 @@ properties:
 
 patternProperties:
   "^.*@[0-9a-fA-F]+$":
+    type: object
     properties:
       reg:
         maxItems: 1
Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml +1 -0
index e5a411518be1..b5b3cf5b1ac2 100644
@@ -55,6 +55,7 @@ patternProperties:
   "^pinctrl-[0-9]+$": true
 
   "^nand@[a-f0-9]+$":
+    type: object
     properties:
       reg:
         minimum: 0
Documentation/devicetree/bindings/mtd/nand-controller.yaml +1 -0
index 199ba5ac2a06..d261b7096c69 100644
@@ -40,6 +40,7 @@ properties:
 
 patternProperties:
   "^nand@[a-f0-9]$":
+    type: object
     properties:
       reg:
         description:
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml +3 -0
index 06c4b66c3ee6..3ac5d2088e49 100644
@@ -55,6 +55,7 @@ properties:
 
 patternProperties:
   '^gpio@[0-9a-f]*$':
+    type: object
     properties:
       gpio-controller: true
       '#gpio-cells':
@@ -113,8 +114,10 @@ patternProperties:
       - st,bank-name
 
   '-[0-9]*$':
+    type: object
     patternProperties:
       '^pins':
+        type: object
         description: |
           A pinctrl node should contain at least one subnode representing the
           pinctrl group available on the machine. Each subnode will list the
Documentation/devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml +1 -0
index c374fd4923a6..6d1329c28170 100644
@@ -50,6 +50,7 @@ properties:
 
 patternProperties:
   "^.*@[0-9a-f]+":
+    type: object
     properties:
       reg:
         items:
Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml +1 -0
index bda7a5befd8b..f36c46d236d7 100644
@@ -55,6 +55,7 @@ properties:
 
 patternProperties:
   "^.*@[0-9a-f]+":
+    type: object
     properties:
       reg:
         items:
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Rob,

Rob Herring <[email protected]> wrote on Mon, 15 Jul 2019 17:04:57 -0600:

Quoted 35 lines

Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions.

Cc Maxime Ripard <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Mark Brown <[email protected]>

---
Please ack. I will take this via the DT tree.

Rob

 .../devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml       | 1 +
 .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml      | 1 +
 Documentation/devicetree/bindings/mtd/nand-controller.yaml     | 1 +
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml          | 3 +++
 .../devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml       | 1 +
 .../devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml       | 1 +
 6 files changed, 8 insertions(+)

[...]

Documentation/devicetree/bindings/mtd/nand-controller.yaml properties: · line 46

Quoted 12 lines
Documentation/devicetree/bindings/mtd/nand-controller.yaml +1 -0
index 199ba5ac2a06..d261b7096c69 100644
@@ -40,6 +40,7 @@ properties:
 
 patternProperties:
   "^nand@[a-f0-9]$":
+    type: object
     properties:
       reg:
         description:

For the mtd .yaml:

Thanks,
Miquèl

Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 14 lines · Rob Herring

Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions.

Cc Maxime Ripard <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Linus Walleij <[email protected]>
Quoted 8 lines

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Rob Herring
Quoted 4 lines · Rob Herring

Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Acked-by on v1 1/1
#4 lore raw
In reply to Rob Herring

Hi Rob

Quoted 22 lines · Rob Herring

Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions.

Cc Maxime Ripard <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Mark Brown <[email protected]>
Quoted 3 lines

---
Please ack. I will take this via the DT tree.

For pinctrl STM32:

thanks

Alexandre

Quoted 3 lines

Rob

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/