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 <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
This commit is contained in:
Rob Herring 2021-01-29 16:03:17 -06:00
Родитель 49ec0686b3
Коммит 9183908e70
8 изменённых файлов: 12 добавлений и 16 удалений

Просмотреть файл

@ -46,8 +46,7 @@ properties:
if:
properties:
compatible:
items:
const: allwinner,sun50i-h6-crypto
const: allwinner,sun50i-h6-crypto
then:
properties:
clocks:

Просмотреть файл

@ -36,7 +36,7 @@ if:
properties:
compatible:
contains:
const: brcm,bcm2711-hvs"
const: brcm,bcm2711-hvs
then:
required:

Просмотреть файл

@ -69,6 +69,7 @@ patternProperties:
if:
patternProperties:
"^gpio@[0-6]$":
type: object
properties:
compatible:
contains:

Просмотреть файл

@ -123,7 +123,7 @@ required:
if:
properties:
compatible:
items:
contains:
enum:
- renesas,sdhi-r7s72100
- renesas,sdhi-r7s9210

Просмотреть файл

@ -99,8 +99,7 @@ patternProperties:
if:
properties:
compatible:
items:
const: brcm,iproc-ns2-sata-phy
const: brcm,iproc-ns2-sata-phy
then:
properties:
reg:

Просмотреть файл

@ -81,9 +81,8 @@ properties:
if:
properties:
compatible:
items:
enum:
- renesas,usb2-phy-r7s9210
contains:
const: renesas,usb2-phy-r7s9210
then:
required:
- clock-names

Просмотреть файл

@ -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

Просмотреть файл

@ -46,8 +46,7 @@ required:
if:
properties:
compatible:
items:
const: allwinner,sun5i-a13-hstimer
const: allwinner,sun5i-a13-hstimer
then:
properties: