Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Drop more redundant 'maxItems/minItems' in if/then schemas

Another round from new cases in 5.19-rc of removing redundant
minItems/maxItems when 'items' list is specified. This time it is in
if/then schemas as the meta-schema was failing to check this case.

If a property has an 'items' list, then a 'minItems' or 'maxItems' with the
same size as the list is redundant and can be dropped. Note that is DT
schema specific behavior and not standard json-schema behavior. The tooling
will fixup the final schema adding any unspecified minItems/maxItems.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20220606225137.1536010-1-robh@kernel.org

-5
-3
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml
··· 150 150 description: 5 memory controller channels and 1 for stream-id registers 151 151 152 152 reg-names: 153 - maxItems: 6 154 153 items: 155 154 - const: sid 156 155 - const: broadcast ··· 169 170 description: 17 memory controller channels and 1 for stream-id registers 170 171 171 172 reg-names: 172 - minItems: 18 173 173 items: 174 174 - const: sid 175 175 - const: broadcast ··· 200 202 description: 17 memory controller channels and 1 for stream-id registers 201 203 202 204 reg-names: 203 - minItems: 18 204 205 items: 205 206 - const: sid 206 207 - const: broadcast
-1
Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
··· 145 145 items: 146 146 - description: Xenon IP registers 147 147 - description: Armada 3700 SoC PHY PAD Voltage Control register 148 - minItems: 2 149 148 150 149 marvell,pad-type: 151 150 $ref: /schemas/types.yaml#/definitions/string
-1
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
··· 64 64 then: 65 65 properties: 66 66 clocks: 67 - minItems: 2 68 67 items: 69 68 - description: High-frequency oscillator input, divided internally 70 69 - description: Low-frequency oscillator input