dt-bindings: Fix incomplete if/then/else schemas
Subsystems (14)
Rob Herring
maintainerPATCH 1/1 dt-bindings: Fix incomplete if/then/else schemas
A recent review highlighted that the json-schema meta-schema allows any combination of if/then/else schema keywords even though if, then or else by themselves makes little sense. With an added meta-schema to only allow valid combinations, there's a handful of schemas found which need fixing in a variety of ways. Incorrect indentation is the most common issue.
--- .../bindings/iio/adc/adi,ad7476.yaml | 1 + .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 8 +- .../bindings/iio/dac/adi,ad5360.yaml | 6 +- .../bindings/interconnect/qcom,rpm.yaml | 84 +++++++++---------- .../bindings/mmc/nvidia,tegra20-sdhci.yaml | 2 + .../bindings/net/ti,davinci-mdio.yaml | 1 + .../bindings/phy/nvidia,tegra20-usb-phy.yaml | 20 ++--- .../bindings/phy/qcom,usb-hs-phy.yaml | 36 ++++---- .../bindings/regulator/fixed-regulator.yaml | 34 ++++---- .../bindings/sound/st,stm32-sai.yaml | 6 +- .../devicetree/bindings/sram/sram.yaml | 16 ++-- 11 files changed, 108 insertions(+), 106 deletions(-)
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml +1 -0
@@ -98,6 +98,7 @@ allOf: - ti,adc121s - ti,ads7866 - ti,ads7868 + then: required: - vcc-supply # Devices with a vref
Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml +4 -4
@@ -174,7 +174,7 @@ patternProperties: contains: const: st,stm32-dfsdm-adc - - then: + then: properties: st,adc-channels: minItems: 1
@@ -206,7 +206,7 @@ patternProperties: contains: const: st,stm32-dfsdm-dmic - - then: + then: properties: st,adc-channels: maxItems: 1
@@ -254,7 +254,7 @@ allOf: contains: const: st,stm32h7-dfsdm - - then: + then: patternProperties: "^filter@[0-9]+$": properties:
@@ -269,7 +269,7 @@ allOf: contains: const: st,stm32mp1-dfsdm - - then: + then: patternProperties: "^filter@[0-9]+$": properties:
Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml +3 -3
@@ -59,9 +59,9 @@ allOf: contains: enum: - adi,ad5371 - then: - required: - - vref2-supply + then: + required: + - vref2-supply examples: - |
Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml +42 -42
90 lines not on this page · raw message
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.yaml +2 -0
@@ -197,6 +197,8 @@ allOf: - nvidia,tegra30-sdhci - nvidia,tegra114-sdhci - nvidia,tegra124-sdhci + then: + properties: clocks: items: - description: module clock
Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml +1 -0
@@ -56,6 +56,7 @@ if: compatible: contains: const: ti,davinci_mdio +then: required: - bus_freq
Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.yaml +10 -10
@@ -275,17 +275,17 @@ allOf: - nvidia,hssquelch-level - nvidia,hsdiscon-level - else: - properties: - clocks: - maxItems: 4 + else: + properties: + clocks: + maxItems: 4 - clock-names: - items: - - const: reg - - const: pll_u - - const: timer - - const: utmi-pads + clock-names: + items: + - const: reg + - const: pll_u + - const: timer + - const: utmi-pads - if: properties:
Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml +18 -18
@@ -14,24 +14,24 @@ if: compatible: contains: const: qcom,usb-hs-phy-apq8064 - then: - properties: - resets: - maxItems: 1 - - reset-names: - const: por - - else: - properties: - resets: - minItems: 2 - maxItems: 2 - - reset-names: - items: - - const: phy - - const: por +then: + properties: + resets: + maxItems: 1 + + reset-names: + const: por + +else: + properties: + resets: + minItems: 2 + maxItems: 2 + + reset-names: + items: + - const: phy + - const: por properties: compatible:
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml +17 -17
@@ -18,23 +18,23 @@ description: allOf: - $ref: "regulator.yaml#" - -if: - properties: - compatible: - contains: - const: regulator-fixed-clock - required: - - clocks -else: - if: - properties: - compatible: - contains: - const: regulator-fixed-domain - required: - - power-domains - - required-opps + - if: + properties: + compatible: + contains: + const: regulator-fixed-clock + then: + required: + - clocks + - if: + properties: + compatible: + contains: + const: regulator-fixed-domain + then: + required: + - power-domains + - required-opps properties: compatible:
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +2 -4
@@ -136,8 +136,7 @@ allOf: compatible: contains: const: st,stm32f4-sai - - - then: + then: properties: clocks: items:
@@ -148,8 +147,7 @@ allOf: items: - const: x8k - const: x11k - - - else: + else: properties: clocks: items:
Documentation/devicetree/bindings/sram/sram.yaml +8 -8
@@ -136,14 +136,14 @@ required: - reg if: - properties: - compatible: - contains: - enum: - - qcom,rpm-msg-ram - - rockchip,rk3288-pmu-sram - -else: + not: + properties: + compatible: + contains: + enum: + - qcom,rpm-msg-ram + - rockchip,rk3288-pmu-sram +then: required: - "#address-cells" - "#size-cells"
Signature · 1 line
2.32.0
Quoted 6 lines · Rob Herring
A recent review highlighted that the json-schema meta-schema allows any combination of if/then/else schema keywords even though if, then or else by themselves makes little sense. With an added meta-schema to only allow valid combinations, there's a handful of schemas found which need fixing in a variety of ways. Incorrect indentation is the most common issue.
Quoted 7 lines · On Wed, 30 Mar 2022 09:57:41 -0500 Rob Herring wrote:
A recent review highlighted that the json-schema meta-schema allows any combination of if/then/else schema keywords even though if, then or else by themselves makes little sense. With an added meta-schema to only allow valid combinations, there's a handful of schemas found which need fixing in a variety of ways. Incorrect indentation is the most common issue.
Quoted 13 lines
Cc Lars-Peter Clausen <[email protected]>Cc Michael Hennerich <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Olivier Moysan <[email protected]>Cc Arnaud Pouliquen <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Georgi Djakov <[email protected]>Cc Ulf Hansson <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc "David S. Miller" <[email protected]>Cc Jakub Kicinski <[email protected]>
Quoted 34 lines · Rob Herring
A recent review highlighted that the json-schema meta-schema allows any combination of if/then/else schema keywords even though if, then or else by themselves makes little sense. With an added meta-schema to only allow valid combinations, there's a handful of schemas found which need fixing in a variety of ways. Incorrect indentation is the most common issue.
Cc Lars-Peter Clausen <[email protected]>Cc Michael Hennerich <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Olivier Moysan <[email protected]>Cc Arnaud Pouliquen <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Georgi Djakov <[email protected]>Cc Ulf Hansson <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc "David S. Miller" <[email protected]>Cc Jakub Kicinski <[email protected]>Cc Paolo Abeni <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Fabrice Gasnier <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Dmitry Osipenko <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 13 lines
--- .../bindings/iio/adc/adi,ad7476.yaml | 1 + .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 8 +- .../bindings/iio/dac/adi,ad5360.yaml | 6 +- .../bindings/interconnect/qcom,rpm.yaml | 84 +++++++++---------- .../bindings/mmc/nvidia,tegra20-sdhci.yaml | 2 + .../bindings/net/ti,davinci-mdio.yaml | 1 + .../bindings/phy/nvidia,tegra20-usb-phy.yaml | 20 ++--- .../bindings/phy/qcom,usb-hs-phy.yaml | 36 ++++---- .../bindings/regulator/fixed-regulator.yaml | 34 ++++---- .../bindings/sound/st,stm32-sai.yaml | 6 +- .../devicetree/bindings/sram/sram.yaml | 16 ++-- 11 files changed, 108 insertions(+), 106 deletions(-)
Looks good:
Best regards,
Krzysztof
Quoted 34 lines · Rob Herring
A recent review highlighted that the json-schema meta-schema allows any combination of if/then/else schema keywords even though if, then or else by themselves makes little sense. With an added meta-schema to only allow valid combinations, there's a handful of schemas found which need fixing in a variety of ways. Incorrect indentation is the most common issue.
Cc Lars-Peter Clausen <[email protected]>Cc Michael Hennerich <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Olivier Moysan <[email protected]>Cc Arnaud Pouliquen <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Georgi Djakov <[email protected]>Cc Ulf Hansson <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc "David S. Miller" <[email protected]>Cc Jakub Kicinski <[email protected]>Cc Paolo Abeni <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Vinod Koul <[email protected]>Cc Mark Brown <[email protected]>Cc Fabrice Gasnier <[email protected]>Cc Grygorii Strashko <[email protected]>Cc Dmitry Osipenko <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 14 lines
--- .../bindings/iio/adc/adi,ad7476.yaml | 1 + .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 8 +- .../bindings/iio/dac/adi,ad5360.yaml | 6 +- .../bindings/interconnect/qcom,rpm.yaml | 84 +++++++++---------- .../bindings/mmc/nvidia,tegra20-sdhci.yaml | 2 + .../bindings/net/ti,davinci-mdio.yaml | 1 + .../bindings/phy/nvidia,tegra20-usb-phy.yaml | 20 ++--- .../bindings/phy/qcom,usb-hs-phy.yaml | 36 ++++---- .../bindings/regulator/fixed-regulator.yaml | 34 ++++---- .../bindings/sound/st,stm32-sai.yaml | 6 +- .../devicetree/bindings/sram/sram.yaml | 16 ++-- 11 files changed, 108 insertions(+), 106 deletions(-)
Applied, thanks!
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy