regulator: dt-bindings: mt6311: Convert to DT schema
PATCH 1/1 regulator: dt-bindings: mt6311: Convert to DT schema
Convert mediatek,mt6311 to DT schema.
Signed-off-by Ninad Naik <[email protected]>
--- .../regulator/mediatek,mt6311-regulator.yaml | 72 +++++++++++++++++++ .../bindings/regulator/mt6311-regulator.txt | 35 --------- 2 files changed, 72 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6311-regulator.txt
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +72 -0
@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6311-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT6311 Regulator + +maintainers: + - AngeloGioacchino Del Regno <[email protected]> + +description: | + The MediaTek MT6311 is an I2C power management IC that provides one step-down + converter and one low-dropout regulator. The regulators are named VDVFS and + VBIASN, respectively. + +properties: + compatible: + const: mediatek,mt6311-regulator + + reg: + description: I2C slave address. + maxItems: 1 + + regulators: + type: object + description: List of regulators provided by this controller. + + patternProperties: + "^(VDVFS|VBIASN)$": + type: object + $ref: regulator.yaml# + description: | + Regulator nodes. + unevaluatedProperties: false + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mt6311: pmic@6b { + compatible = "mediatek,mt6311-regulator"; + reg = <0x6b>; + + regulators { + mt6311_vcpu_reg: VDVFS { + regulator-name = "VDVFS"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <10000>; + }; + + mt6311_ldo_reg: VBIASN { + regulator-name = "VBIASN"; + regulator-min-microvolt = <200000>; + regulator-max-microvolt = <800000>; + }; + }; + }; + }; +...
Documentation/devicetree/bindings/regulator/mt6311-regulator.txt deleted +0 -35
@@ -1,35 +0,0 @@ -Mediatek MT6311 Regulator - -Required properties: -- compatible: "mediatek,mt6311-regulator" -- reg: I2C slave address, usually 0x6b. -- regulators: List of regulators provided by this controller. It is named - to VDVFS and VBIASN. - The definition for each of these nodes is defined using the standard binding - for regulators at Documentation/devicetree/bindings/regulator/regulator.txt. - -The valid names for regulators are: -BUCK: - VDVFS -LDO: - VBIASN - -Example: - mt6311: pmic@6b { - compatible = "mediatek,mt6311-regulator"; - reg = <0x6b>; - - regulators { - mt6311_vcpu_reg: VDVFS { - regulator-name = "VDVFS"; - regulator-min-microvolt = < 600000>; - regulator-max-microvolt = <1400000>; - regulator-ramp-delay = <10000>; - }; - mt6311_ldo_reg: VBIASN { - regulator-name = "VBIASN"; - regulator-min-microvolt = <200000>; - regulator-max-microvolt = <800000>; - }; - }; - };
Signature · 1 line
2.54.0
Rob Herring
maintainerQuoted 18 lines · Ninad Naik
Convert mediatek,mt6311 to DT schema.
Signed-off-by Ninad Naik <[email protected]>--- .../regulator/mediatek,mt6311-regulator.yaml | 72 +++++++++++++++++++ .../bindings/regulator/mt6311-regulator.txt | 35 --------- 2 files changed, 72 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6311-regulator.txtDocumentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +2
-0@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml line 12
Quoted 10 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +10
-0+--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6311-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT6311 Regulator + +maintainers: + - AngeloGioacchino Del Regno <[email protected]> + +description: |
Don't need '|' if no formatting.
Quoted 12 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +12
-0+ The MediaTek MT6311 is an I2C power management IC that provides one step-down + converter and one low-dropout regulator. The regulators are named VDVFS and + VBIASN, respectively. + +properties: + compatible: + const: mediatek,mt6311-regulator + + reg: + description: I2C slave address. + maxItems: 1 +
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +10
-0+ regulators: + type: object + description: List of regulators provided by this controller. + + patternProperties: + "^(VDVFS|VBIASN)$": + type: object + $ref: regulator.yaml# + description: | + Regulator nodes.
Drop. That's obvious with the $ref.
Quoted 8 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +8
-0+ unevaluatedProperties: false + + additionalProperties: false + +required: + - compatible + - reg + - regulators
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +10
-0+ +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mt6311: pmic@6b {
Drop unused label.
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml line 57
Quoted 5 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +5
-0+ compatible = "mediatek,mt6311-regulator"; + reg = <0x6b>; + + regulators { + mt6311_vcpu_reg: VDVFS {
Drop unused label.
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml line 64
Quoted 7 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +7
-0+ regulator-name = "VDVFS"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <10000>; + }; + + mt6311_ldo_reg: VBIASN {
Drop unused label.
Quoted 53 lines
Documentation/devicetree/bindings/regulator/mediatek,mt6311-regulator.yaml new file +8
-0+ regulator-name = "VBIASN"; + regulator-min-microvolt = <200000>; + regulator-max-microvolt = <800000>; + }; + }; + }; + }; +...Documentation/devicetree/bindings/regulator/mt6311-regulator.txt deleted +0
-35@@ -1,35 +0,0 @@ -Mediatek MT6311 Regulator - -Required properties: -- compatible: "mediatek,mt6311-regulator" -- reg: I2C slave address, usually 0x6b. -- regulators: List of regulators provided by this controller. It is named - to VDVFS and VBIASN. - The definition for each of these nodes is defined using the standard binding - for regulators at Documentation/devicetree/bindings/regulator/regulator.txt. - -The valid names for regulators are: -BUCK: - VDVFS -LDO: - VBIASN - -Example: - mt6311: pmic@6b { - compatible = "mediatek,mt6311-regulator"; - reg = <0x6b>; - - regulators { - mt6311_vcpu_reg: VDVFS { - regulator-name = "VDVFS"; - regulator-min-microvolt = < 600000>; - regulator-max-microvolt = <1400000>; - regulator-ramp-delay = <10000>; - }; - mt6311_ldo_reg: VBIASN { - regulator-name = "VBIASN"; - regulator-min-microvolt = <200000>; - regulator-max-microvolt = <800000>; - }; - }; - };Signature · 1 line
2.54.0