Skip to content

Commit

Permalink
dt-bindings: Ensure child nodes are of type 'object'
Browse files Browse the repository at this point in the history
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: Chen-Yu Tsai <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Acked-by: Miquel Raynal <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Alexandre TORGUE <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
robherring committed Jul 21, 2019
1 parent abdfd52 commit 15ffef1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ properties:

patternProperties:
"^.*@[0-9a-fA-F]+$":
type: object
properties:
reg:
maxItems: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ patternProperties:
"^pinctrl-[0-9]+$": true

"^nand@[a-f0-9]+$":
type: object
properties:
reg:
minimum: 0
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mtd/nand-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ properties:

patternProperties:
"^nand@[a-f0-9]$":
type: object
properties:
reg:
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ properties:

patternProperties:
'^gpio@[0-9a-f]*$':
type: object
properties:
gpio-controller: true
'#gpio-cells':
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ properties:

patternProperties:
"^.*@[0-9a-f]+":
type: object
properties:
reg:
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ properties:

patternProperties:
"^.*@[0-9a-f]+":
type: object
properties:
reg:
items:
Expand Down

0 comments on commit 15ffef1

Please sign in to comment.