dt-bindings: Clean-up regulator '-supply' schemas
Subsystems (13)
Rob Herring
maintainerPATCH 1/1 dt-bindings: Clean-up regulator '-supply' schemas
Regulator '*-supply' properties are always a single phandle, so 'maxItems: 1' or a $ref is not necessary. All that's needed is either 'true' or an optional 'description'. Following this clean-up, the meta-schema will enforce this pattern.
There's one case in tree with 'innolux,n156bge-l21' having 2 phandles. This appears to be a mistake or abuse of simple-panel as it's 2 different voltage rails connected to 'power-supply'.
--- .../devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml | 2 -- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 3 +-- Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 3 +-- Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 3 +-- Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 3 --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 5 +---- Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | 1 - Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml | 1 - .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 4 +--- .../devicetree/bindings/iio/chemical/plantower,pms7003.yaml | 1 - Documentation/devicetree/bindings/iio/pressure/bmp085.yaml | 2 -- .../devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 1 - .../devicetree/bindings/regulator/fixed-regulator.yaml | 1 - 13 files changed, 5 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml +0 -2
@@ -79,8 +79,6 @@ properties: hdmi-supply: description: phandle to an external 5V regulator to power the HDMI logic - allOf: - - $ref: /schemas/types.yaml#/definitions/phandle port@0: type: object
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +1 -2
@@ -37,8 +37,7 @@ properties: clocks: maxItems: 1 - mali-supply: - maxItems: 1 + mali-supply: true operating-points-v2: true
Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml +1 -2
@@ -69,8 +69,7 @@ properties: - const: core - const: bus - mali-supply: - maxItems: 1 + mali-supply: true resets: minItems: 1
Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml +1 -2
@@ -97,8 +97,7 @@ properties: memory-region: true - mali-supply: - maxItems: 1 + mali-supply: true power-domains: maxItems: 1
Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml +0 -3
@@ -45,15 +45,12 @@ properties: refin1-supply: description: refin1 supply can be used as reference for conversion. - maxItems: 1 refin2-supply: description: refin2 supply can be used as reference for conversion. - maxItems: 1 avdd-supply: description: avdd supply can be used as reference for conversion. - maxItems: 1 required: - compatible
Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +1 -4
@@ -31,10 +31,7 @@ properties: spi-cpha: true - avcc-supply: - description: - Phandle to the Avcc power supply - maxItems: 1 + avcc-supply: true interrupts: maxItems: 1
Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml +0 -1
@@ -39,7 +39,6 @@ properties: avdd-supply: description: The regulator supply for the ADC reference voltage. - maxItems: 1 powerdown-gpios: description:
Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml +0 -1
@@ -41,7 +41,6 @@ properties: avdd-supply: description: Definition of the regulator used as analog supply - maxItems: 1 clock-frequency: minimum: 20000
Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml +1 -3
@@ -46,9 +46,7 @@ properties: "#io-channel-cells": const: 1 - vdd-supply: - description: VDD input supply - maxItems: 1 + vdd-supply: true samsung,syscon-phandle: $ref: '/schemas/types.yaml#/definitions/phandle'
Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml +0 -1
@@ -25,7 +25,6 @@ properties: vcc-supply: description: regulator that provides power to the sensor - maxItems: 1 plantower,set-gpios: description: GPIO connected to the SET line
Documentation/devicetree/bindings/iio/pressure/bmp085.yaml +0 -2
@@ -28,12 +28,10 @@ properties: vddd-supply: description: digital voltage regulator (see regulator/regulator.txt) - maxItems: 1 vdda-supply: description: analog voltage regulator (see regulator/regulator.txt) - maxItems: 1 reset-gpios: description:
Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml +0 -1
@@ -36,7 +36,6 @@ properties: const: 0 phy-supply: - maxItems: 1 description: Phandle to a regulator that provides power to the PHY. This regulator will be managed during the PHY power on/off sequence.
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml +0 -1
@@ -64,7 +64,6 @@ properties: vin-supply: description: Input supply phandle. - $ref: /schemas/types.yaml#/definitions/phandle required: - compatible
Signature · 1 line
2.20.1
Quoted 8 lines · On Fri, 11 Oct 2019 14:02:31 -0500 Rob Herring <[email protected]> wrote:
Regulator '*-supply' properties are always a single phandle, so 'maxItems: 1' or a $ref is not necessary. All that's needed is either 'true' or an optional 'description'. Following this clean-up, the meta-schema will enforce this pattern.
There's one case in tree with 'innolux,n156bge-l21' having 2 phandles. This appears to be a mistake or abuse of simple-panel as it's 2 different voltage rails connected to 'power-supply'.
Nice to centralise bits of schema like this, though perhaps it does make everything feel a bit unpredictable as not obvious to someone writing a binding that a particular corner has been centralized but others haven't.
Oh well, I guess they should look at the relevant docs for each bit.
Thanks,
Jonathan
Quoted 209 lines
Cc Neil Armstrong <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Kishon Vijay Abraham I <[email protected]>Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Signed-off-by Rob Herring <[email protected]>--- .../devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml | 2 -- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 3 +-- Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 3 +-- Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 3 +-- Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 3 --- Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 5 +---- Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | 1 - Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml | 1 - .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 4 +--- .../devicetree/bindings/iio/chemical/plantower,pms7003.yaml | 1 - Documentation/devicetree/bindings/iio/pressure/bmp085.yaml | 2 -- .../devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 1 - .../devicetree/bindings/regulator/fixed-regulator.yaml | 1 - 13 files changed, 5 insertions(+), 25 deletions(-)Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml +0
-2@@ -79,8 +79,6 @@ properties: hdmi-supply: description: phandle to an external 5V regulator to power the HDMI logic - allOf: - - $ref: /schemas/types.yaml#/definitions/phandle port@0: type: objectDocumentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +1
-2@@ -37,8 +37,7 @@ properties: clocks: maxItems: 1 - mali-supply: - maxItems: 1 + mali-supply: true operating-points-v2: trueDocumentation/devicetree/bindings/gpu/arm,mali-midgard.yaml +1
-2@@ -69,8 +69,7 @@ properties: - const: core - const: bus - mali-supply: - maxItems: 1 + mali-supply: true resets: minItems: 1Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml +1
-2@@ -97,8 +97,7 @@ properties: memory-region: true - mali-supply: - maxItems: 1 + mali-supply: true power-domains: maxItems: 1Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml +0
-3@@ -45,15 +45,12 @@ properties: refin1-supply: description: refin1 supply can be used as reference for conversion. - maxItems: 1 refin2-supply: description: refin2 supply can be used as reference for conversion. - maxItems: 1 avdd-supply: description: avdd supply can be used as reference for conversion. - maxItems: 1 required: - compatibleDocumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +1
-4@@ -31,10 +31,7 @@ properties: spi-cpha: true - avcc-supply: - description: - Phandle to the Avcc power supply - maxItems: 1 + avcc-supply: true interrupts: maxItems: 1Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml +0
-1@@ -39,7 +39,6 @@ properties: avdd-supply: description: The regulator supply for the ADC reference voltage. - maxItems: 1 powerdown-gpios: description:Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml +0
-1@@ -41,7 +41,6 @@ properties: avdd-supply: description: Definition of the regulator used as analog supply - maxItems: 1 clock-frequency: minimum: 20000Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml +1
-3@@ -46,9 +46,7 @@ properties: "#io-channel-cells": const: 1 - vdd-supply: - description: VDD input supply - maxItems: 1 + vdd-supply: true samsung,syscon-phandle: $ref: '/schemas/types.yaml#/definitions/phandle'Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml +0
-1@@ -25,7 +25,6 @@ properties: vcc-supply: description: regulator that provides power to the sensor - maxItems: 1 plantower,set-gpios: description: GPIO connected to the SET lineDocumentation/devicetree/bindings/iio/pressure/bmp085.yaml +0
-2@@ -28,12 +28,10 @@ properties: vddd-supply: description: digital voltage regulator (see regulator/regulator.txt) - maxItems: 1 vdda-supply: description: analog voltage regulator (see regulator/regulator.txt) - maxItems: 1 reset-gpios: description:Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml +0
-1@@ -36,7 +36,6 @@ properties: const: 0 phy-supply: - maxItems: 1 description: Phandle to a regulator that provides power to the PHY. This regulator will be managed during the PHY power on/off sequence.Documentation/devicetree/bindings/regulator/fixed-regulator.yaml +0
-1@@ -64,7 +64,6 @@ properties: vin-supply: description: Input supply phandle. - $ref: /schemas/types.yaml#/definitions/phandle required: - compatible
Quoted 4 lines · Rob Herring
Regulator '*-supply' properties are always a single phandle, so 'maxItems: 1' or a $ref is not necessary. All that's needed is either 'true' or an optional 'description'. Following this clean-up, the meta-schema will enforce this pattern.