dt-bindings: Fix errors in 'if' schemas
authorRob Herring <robh@kernel.org>
Fri, 29 Jan 2021 22:03:17 +0000 (16:03 -0600)
committerRob Herring <robh@kernel.org>
Thu, 4 Feb 2021 15:08:20 +0000 (09:08 -0600)
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 <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-crypto@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-By: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210202205544.24812-3-robh@kernel.org
Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml
Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
Documentation/devicetree/bindings/leds/ti,tca6507.yaml
Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml
Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml

index 7a60d84289cc90a0a2f302c55b4122a526ded2ba..6ab07eba7778244fc088d750a7810196e872b25e 100644 (file)
@@ -46,8 +46,7 @@ properties:
 if:
   properties:
     compatible:
-      items:
-        const: allwinner,sun50i-h6-crypto
+      const: allwinner,sun50i-h6-crypto
 then:
   properties:
     clocks:
index e826ab0adb75dc87665a9550c67439449420adfc..2e8566f47e63c0ea30b7855c0fd8a163e940a935 100644 (file)
@@ -36,7 +36,7 @@ if:
   properties:
     compatible:
       contains:
-        const: brcm,bcm2711-hvs"
+        const: brcm,bcm2711-hvs
 
 then:
   required:
index 94c307c987621c5bcf3182ae2384889f4dd0b516..32c60038789586926d5bf8d3e86734c51caf095c 100644 (file)
@@ -69,6 +69,7 @@ patternProperties:
 if:
   patternProperties:
     "^gpio@[0-6]$":
+      type: object
       properties:
         compatible:
           contains:
index 6bbf29b5c2392acd373c5aa50abf29dbc7527251..6c13703b31db52df66abc8f1515d26fdfe71613d 100644 (file)
@@ -123,7 +123,7 @@ required:
 if:
   properties:
     compatible:
-      items:
+      contains:
         enum:
           - renesas,sdhi-r7s72100
           - renesas,sdhi-r7s9210
index 58c3ef8004ad83d0b3d6f70b61730681344ccfe1..04edda504ab6a985ec3643d509567a666420355a 100644 (file)
@@ -99,8 +99,7 @@ patternProperties:
 if:
   properties:
     compatible:
-      items:
-        const: brcm,iproc-ns2-sata-phy
+      const: brcm,iproc-ns2-sata-phy
 then:
   properties:
     reg:
index 829e8c7e467ae75ef3f024822e4ec69651305b90..0f358d5b84ef74d4ba58e3fbcf63c389129e5e97 100644 (file)
@@ -81,9 +81,8 @@ properties:
 if:
   properties:
     compatible:
-      items:
-        enum:
-          - renesas,usb2-phy-r7s9210
+      contains:
+        const: renesas,usb2-phy-r7s9210
 then:
   required:
     - clock-names
index 5b5b1b9d2ec7422c89059970f6fa82896b384f60..5d3947902f2de60903f149e80c58f12402b05494 100644 (file)
@@ -76,11 +76,10 @@ required:
 if:
   properties:
     compatible:
-      items:
-        enum:
-          - renesas,pfc-r8a73a4
-          - renesas,pfc-r8a7740
-          - renesas,pfc-sh73a0
+      enum:
+        - renesas,pfc-r8a73a4
+        - renesas,pfc-r8a7740
+        - renesas,pfc-sh73a0
 then:
   required:
     - interrupts-extended
index 40fc4bcb31457db7374f4266839894469cd2366f..b6a6d03a08b21ecbea7fcff9b213ed73ee92aead 100644 (file)
@@ -46,8 +46,7 @@ required:
 if:
   properties:
     compatible:
-      items:
-        const: allwinner,sun5i-a13-hstimer
+      const: allwinner,sun5i-a13-hstimer
 
 then:
   properties: