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

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

Another round 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: Vinod Koul <vkoul@kernel.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for IIO
Link: https://lore.kernel.org/r/20220503162738.3827041-1-robh@kernel.org

+5 -68
-4
Documentation/devicetree/bindings/clock/imx8m-clock.yaml
··· 55 55 then: 56 56 properties: 57 57 clocks: 58 - minItems: 7 59 - maxItems: 7 60 58 items: 61 59 - description: 32k osc 62 60 - description: 25m osc ··· 64 66 - description: ext3 clock input 65 67 - description: ext4 clock input 66 68 clock-names: 67 - minItems: 7 68 - maxItems: 7 69 69 items: 70 70 - const: ckil 71 71 - const: osc_25m
-4
Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
··· 95 95 properties: 96 96 clocks: 97 97 minItems: 1 98 - maxItems: 4 99 98 items: 100 99 - description: Functional clock 101 100 - description: EXTAL input clock ··· 103 104 104 105 clock-names: 105 106 minItems: 1 106 - maxItems: 4 107 107 items: 108 108 - const: fck 109 109 # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks. ··· 126 128 else: 127 129 properties: 128 130 clocks: 129 - maxItems: 1 130 131 items: 131 132 - description: Functional clock 132 133 133 134 clock-names: 134 - maxItems: 1 135 135 items: 136 136 - const: fck 137 137
-23
Documentation/devicetree/bindings/display/renesas,du.yaml
··· 109 109 properties: 110 110 clocks: 111 111 minItems: 1 112 - maxItems: 3 113 112 items: 114 113 - description: Functional clock 115 114 - description: DU_DOTCLKIN0 input clock ··· 116 117 117 118 clock-names: 118 119 minItems: 1 119 - maxItems: 3 120 120 items: 121 121 - const: du.0 122 122 - pattern: '^dclkin\.[01]$' ··· 157 159 properties: 158 160 clocks: 159 161 minItems: 2 160 - maxItems: 4 161 162 items: 162 163 - description: Functional clock for DU0 163 164 - description: Functional clock for DU1 ··· 165 168 166 169 clock-names: 167 170 minItems: 2 168 - maxItems: 4 169 171 items: 170 172 - const: du.0 171 173 - const: du.1 ··· 212 216 properties: 213 217 clocks: 214 218 minItems: 2 215 - maxItems: 4 216 219 items: 217 220 - description: Functional clock for DU0 218 221 - description: Functional clock for DU1 ··· 220 225 221 226 clock-names: 222 227 minItems: 2 223 - maxItems: 4 224 228 items: 225 229 - const: du.0 226 230 - const: du.1 ··· 265 271 properties: 266 272 clocks: 267 273 minItems: 2 268 - maxItems: 4 269 274 items: 270 275 - description: Functional clock for DU0 271 276 - description: Functional clock for DU1 ··· 273 280 274 281 clock-names: 275 282 minItems: 2 276 - maxItems: 4 277 283 items: 278 284 - const: du.0 279 285 - const: du.1 ··· 319 327 properties: 320 328 clocks: 321 329 minItems: 2 322 - maxItems: 4 323 330 items: 324 331 - description: Functional clock for DU0 325 332 - description: Functional clock for DU1 ··· 327 336 328 337 clock-names: 329 338 minItems: 2 330 - maxItems: 4 331 339 items: 332 340 - const: du.0 333 341 - const: du.1 ··· 376 386 properties: 377 387 clocks: 378 388 minItems: 3 379 - maxItems: 6 380 389 items: 381 390 - description: Functional clock for DU0 382 391 - description: Functional clock for DU1 ··· 386 397 387 398 clock-names: 388 399 minItems: 3 389 - maxItems: 6 390 400 items: 391 401 - const: du.0 392 402 - const: du.1 ··· 436 448 properties: 437 449 clocks: 438 450 minItems: 4 439 - maxItems: 8 440 451 items: 441 452 - description: Functional clock for DU0 442 453 - description: Functional clock for DU1 ··· 448 461 449 462 clock-names: 450 463 minItems: 4 451 - maxItems: 8 452 464 items: 453 465 - const: du.0 454 466 - const: du.1 ··· 511 525 properties: 512 526 clocks: 513 527 minItems: 3 514 - maxItems: 6 515 528 items: 516 529 - description: Functional clock for DU0 517 530 - description: Functional clock for DU1 ··· 521 536 522 537 clock-names: 523 538 minItems: 3 524 - maxItems: 6 525 539 items: 526 540 - const: du.0 527 541 - const: du.1 ··· 580 596 properties: 581 597 clocks: 582 598 minItems: 3 583 - maxItems: 6 584 599 items: 585 600 - description: Functional clock for DU0 586 601 - description: Functional clock for DU1 ··· 590 607 591 608 clock-names: 592 609 minItems: 3 593 - maxItems: 6 594 610 items: 595 611 - const: du.0 596 612 - const: du.1 ··· 648 666 properties: 649 667 clocks: 650 668 minItems: 1 651 - maxItems: 2 652 669 items: 653 670 - description: Functional clock for DU0 654 671 - description: DU_DOTCLKIN0 input clock 655 672 656 673 clock-names: 657 674 minItems: 1 658 - maxItems: 2 659 675 items: 660 676 - const: du.0 661 677 - const: dclkin.0 ··· 703 723 properties: 704 724 clocks: 705 725 minItems: 2 706 - maxItems: 4 707 726 items: 708 727 - description: Functional clock for DU0 709 728 - description: Functional clock for DU1 ··· 711 732 712 733 clock-names: 713 734 minItems: 2 714 - maxItems: 4 715 735 items: 716 736 - const: du.0 717 737 - const: du.1 ··· 769 791 - description: Functional clock 770 792 771 793 clock-names: 772 - maxItems: 1 773 794 items: 774 795 - const: du.0 775 796
-2
Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
··· 138 138 - const: bus 139 139 - const: adc 140 140 minItems: 1 141 - maxItems: 2 142 141 143 142 interrupts: 144 143 items: ··· 169 170 - const: bus 170 171 - const: adc 171 172 minItems: 1 172 - maxItems: 2 173 173 174 174 interrupts: 175 175 items:
+1 -6
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml
··· 202 202 clocks: 203 203 items: 204 204 - description: module clock 205 - minItems: 1 206 - maxItems: 1 207 205 else: 208 206 properties: 209 207 clocks: 210 208 items: 211 209 - description: module clock 212 210 - description: timeout clock 213 - minItems: 2 214 - maxItems: 2 211 + 215 212 clock-names: 216 213 items: 217 214 - const: sdhci 218 215 - const: tmclk 219 - minItems: 2 220 - maxItems: 2 221 216 required: 222 217 - clock-names 223 218
-2
Documentation/devicetree/bindings/mtd/gpmi-nand.yaml
··· 147 147 - description: SoC gpmi io clock 148 148 - description: SoC gpmi bch apb clock 149 149 clock-names: 150 - minItems: 2 151 - maxItems: 2 152 150 items: 153 151 - const: gpmi_io 154 152 - const: gpmi_bch_apb
-3
Documentation/devicetree/bindings/net/can/bosch,c_can.yaml
··· 80 80 then: 81 81 properties: 82 82 interrupts: 83 - minItems: 4 84 - maxItems: 4 85 83 items: 86 84 - description: Error and status IRQ 87 85 - description: Message object IRQ ··· 89 91 else: 90 92 properties: 91 93 interrupts: 92 - maxItems: 1 93 94 items: 94 95 - description: Error and status IRQ 95 96
+4 -6
Documentation/devicetree/bindings/phy/brcm,sata-phy.yaml
··· 102 102 then: 103 103 properties: 104 104 reg: 105 - maxItems: 2 105 + minItems: 2 106 + 106 107 reg-names: 107 - items: 108 - - const: "phy" 109 - - const: "phy-ctrl" 108 + minItems: 2 110 109 else: 111 110 properties: 112 111 reg: 113 112 maxItems: 1 113 + 114 114 reg-names: 115 115 maxItems: 1 116 - items: 117 - - const: "phy" 118 116 119 117 required: 120 118 - compatible
-10
Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
··· 71 71 then: 72 72 properties: 73 73 clock-output-names: 74 - minItems: 1 75 74 maxItems: 1 76 75 77 76 - if: ··· 101 102 properties: 102 103 clock-output-names: 103 104 minItems: 3 104 - maxItems: 3 105 105 106 106 - if: 107 107 properties: ··· 111 113 then: 112 114 properties: 113 115 clocks: 114 - minItems: 3 115 - maxItems: 3 116 116 items: 117 117 - description: Bus clock for register access 118 118 - description: 24 MHz oscillator 119 119 - description: 32 kHz clock from the CCU 120 120 121 121 clock-names: 122 - minItems: 3 123 - maxItems: 3 124 122 items: 125 123 - const: bus 126 124 - const: hosc ··· 136 142 properties: 137 143 clocks: 138 144 minItems: 3 139 - maxItems: 4 140 145 items: 141 146 - description: Bus clock for register access 142 147 - description: 24 MHz oscillator ··· 144 151 145 152 clock-names: 146 153 minItems: 3 147 - maxItems: 4 148 154 items: 149 155 - const: bus 150 156 - const: hosc ··· 166 174 then: 167 175 properties: 168 176 interrupts: 169 - minItems: 1 170 177 maxItems: 1 171 178 172 179 else: 173 180 properties: 174 181 interrupts: 175 182 minItems: 2 176 - maxItems: 2 177 183 178 184 required: 179 185 - "#clock-cells"
-4
Documentation/devicetree/bindings/serial/samsung_uart.yaml
··· 100 100 maxItems: 3 101 101 clock-names: 102 102 minItems: 2 103 - maxItems: 3 104 103 items: 105 104 - const: uart 106 105 - pattern: '^clk_uart_baud[0-1]$' ··· 117 118 then: 118 119 properties: 119 120 clocks: 120 - minItems: 2 121 121 maxItems: 2 122 122 clock-names: 123 - minItems: 2 124 - maxItems: 2 125 123 items: 126 124 - const: uart 127 125 - const: clk_uart_baud0
-1
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml
··· 89 89 properties: 90 90 dmas: 91 91 minItems: 1 92 - maxItems: 2 93 92 items: 94 93 - description: RX DMA Channel 95 94 - description: TX DMA Channel
-2
Documentation/devicetree/bindings/sound/ti,j721e-cpb-audio.yaml
··· 80 80 then: 81 81 properties: 82 82 clocks: 83 - minItems: 6 84 83 items: 85 84 - description: AUXCLK clock for McASP used by CPB audio 86 85 - description: Parent for CPB_McASP auxclk (for 48KHz) ··· 106 107 then: 107 108 properties: 108 109 clocks: 109 - maxItems: 4 110 110 items: 111 111 - description: AUXCLK clock for McASP used by CPB audio 112 112 - description: Parent for CPB_McASP auxclk (for 48KHz)
-1
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
··· 67 67 properties: 68 68 reg: 69 69 minItems: 2 70 - maxItems: 3 71 70 items: 72 71 - description: TSC1 registers 73 72 - description: TSC2 registers