Skip to content

Commit 9183908

Browse files
committed
dt-bindings: Fix errors in 'if' schemas
Properties in if/then schemas weren't getting checked by the meta-schemas. Enabling meta-schema checks finds several errors. The use of an 'items' schema (as opposed to the list form) is wrong in some cases as it applies to all entries. 'contains' is the correct schema to use in the case of multiple entries. Cc: Herbert Xu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Maxime Ripard <[email protected]> Acked-By: Vinod Koul <[email protected]> Reviewed-by: Nicolas Saenz Julienne <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 49ec068 commit 9183908

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ properties:
4646
if:
4747
properties:
4848
compatible:
49-
items:
50-
const: allwinner,sun50i-h6-crypto
49+
const: allwinner,sun50i-h6-crypto
5150
then:
5251
properties:
5352
clocks:

Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if:
3636
properties:
3737
compatible:
3838
contains:
39-
const: brcm,bcm2711-hvs"
39+
const: brcm,bcm2711-hvs
4040

4141
then:
4242
required:

Documentation/devicetree/bindings/leds/ti,tca6507.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ patternProperties:
6969
if:
7070
patternProperties:
7171
"^gpio@[0-6]$":
72+
type: object
7273
properties:
7374
compatible:
7475
contains:

Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ required:
123123
if:
124124
properties:
125125
compatible:
126-
items:
126+
contains:
127127
enum:
128128
- renesas,sdhi-r7s72100
129129
- renesas,sdhi-r7s9210

Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ patternProperties:
9999
if:
100100
properties:
101101
compatible:
102-
items:
103-
const: brcm,iproc-ns2-sata-phy
102+
const: brcm,iproc-ns2-sata-phy
104103
then:
105104
properties:
106105
reg:

Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ properties:
8181
if:
8282
properties:
8383
compatible:
84-
items:
85-
enum:
86-
- renesas,usb2-phy-r7s9210
84+
contains:
85+
const: renesas,usb2-phy-r7s9210
8786
then:
8887
required:
8988
- clock-names

Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ required:
7676
if:
7777
properties:
7878
compatible:
79-
items:
80-
enum:
81-
- renesas,pfc-r8a73a4
82-
- renesas,pfc-r8a7740
83-
- renesas,pfc-sh73a0
79+
enum:
80+
- renesas,pfc-r8a73a4
81+
- renesas,pfc-r8a7740
82+
- renesas,pfc-sh73a0
8483
then:
8584
required:
8685
- interrupts-extended

Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ required:
4646
if:
4747
properties:
4848
compatible:
49-
items:
50-
const: allwinner,sun5i-a13-hstimer
49+
const: allwinner,sun5i-a13-hstimer
5150

5251
then:
5352
properties:

0 commit comments

Comments
 (0)