dt-bindings: hwmon/regulator: Convert ltc2978.txt to yaml
Subsystems (4)
Frank Li
maintainerPATCH 1/1 dt-bindings: hwmon/regulator: Convert ltc2978.txt to yaml
Convert binding doc ltc2978.txt to yaml format.
Additional change:
- add i2c node.
- basic it is regulator according to example, move it under regulator.
Fix below warning:arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: /soc/i2c@2000000/i2c-mux@77/i2c@2/regulator@5c:
failed to match any schema with compatible: ['lltc,ltc3882']
--- .../devicetree/bindings/hwmon/ltc2978.txt | 62 ------------ .../bindings/regulator/lltc,ltc2972.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 62 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwmon/ltc2978.txt create mode 100644 Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml
Documentation/devicetree/bindings/hwmon/ltc2978.txt deleted +0 -62
@@ -1,62 +0,0 @@ -ltc2978 - -Required properties: -- compatible: should contain one of: - * "lltc,ltc2972" - * "lltc,ltc2974" - * "lltc,ltc2975" - * "lltc,ltc2977" - * "lltc,ltc2978" - * "lltc,ltc2979" - * "lltc,ltc2980" - * "lltc,ltc3880" - * "lltc,ltc3882" - * "lltc,ltc3883" - * "lltc,ltc3884" - * "lltc,ltc3886" - * "lltc,ltc3887" - * "lltc,ltc3889" - * "lltc,ltc7880" - * "lltc,ltm2987" - * "lltc,ltm4664" - * "lltc,ltm4675" - * "lltc,ltm4676" - * "lltc,ltm4677" - * "lltc,ltm4678" - * "lltc,ltm4680" - * "lltc,ltm4686" - * "lltc,ltm4700" -- reg: I2C slave address - -Optional properties: -- regulators: A node that houses a sub-node for each regulator controlled by - the device. Each sub-node is identified using the node's name, with valid - values listed below. The content of each sub-node is defined by the - standard binding for regulators; see regulator.txt. - -Valid names of regulators depend on number of supplies supported per device: - * ltc2972 vout0 - vout1 - * ltc2974, ltc2975 : vout0 - vout3 - * ltc2977, ltc2979, ltc2980, ltm2987 : vout0 - vout7 - * ltc2978 : vout0 - vout7 - * ltc3880, ltc3882, ltc3884, ltc3886, ltc3887, ltc3889 : vout0 - vout1 - * ltc7880 : vout0 - vout1 - * ltc3883 : vout0 - * ltm4664 : vout0 - vout1 - * ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1 - * ltm4680, ltm4686 : vout0 - vout1 - * ltm4700 : vout0 - vout1 - -Example: -ltc2978@5e { - compatible = "lltc,ltc2978"; - reg = <0x5e>; - regulators { - vout0 { - regulator-name = "FPGA-2.5V"; - }; - vout2 { - regulator-name = "FPGA-1.5V"; - }; - }; -};
Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml new file +94 -0
94 lines not on this page · raw message
Signature · 1 line
2.34.1
Rob Herring
maintainerQuoted 9 lines · Frank Li
Convert binding doc ltc2978.txt to yaml format.
Additional change:
- add i2c node.
- basic it is regulator according to example, move it under regulator.Fix below warning:
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: /soc/i2c@2000000/i2c-mux@77/i2c@2/regulator@5c:
failed to match any schema with compatible: ['lltc,ltc3882']
Quoted 7 lines
Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/hwmon/ltc2978.txt | 62 ------------ .../bindings/regulator/lltc,ltc2972.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 62 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwmon/ltc2978.txt create mode 100644 Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml
I'm on the fence whether to move this...
Quoted 74 lines
Documentation/devicetree/bindings/hwmon/ltc2978.txt deleted +0
-62@@ -1,62 +0,0 @@ -ltc2978 - -Required properties: -- compatible: should contain one of: - * "lltc,ltc2972" - * "lltc,ltc2974" - * "lltc,ltc2975" - * "lltc,ltc2977" - * "lltc,ltc2978" - * "lltc,ltc2979" - * "lltc,ltc2980" - * "lltc,ltc3880" - * "lltc,ltc3882" - * "lltc,ltc3883" - * "lltc,ltc3884" - * "lltc,ltc3886" - * "lltc,ltc3887" - * "lltc,ltc3889" - * "lltc,ltc7880" - * "lltc,ltm2987" - * "lltc,ltm4664" - * "lltc,ltm4675" - * "lltc,ltm4676" - * "lltc,ltm4677" - * "lltc,ltm4678" - * "lltc,ltm4680" - * "lltc,ltm4686" - * "lltc,ltm4700" -- reg: I2C slave address - -Optional properties: -- regulators: A node that houses a sub-node for each regulator controlled by - the device. Each sub-node is identified using the node's name, with valid - values listed below. The content of each sub-node is defined by the - standard binding for regulators; see regulator.txt. - -Valid names of regulators depend on number of supplies supported per device: - * ltc2972 vout0 - vout1 - * ltc2974, ltc2975 : vout0 - vout3 - * ltc2977, ltc2979, ltc2980, ltm2987 : vout0 - vout7 - * ltc2978 : vout0 - vout7 - * ltc3880, ltc3882, ltc3884, ltc3886, ltc3887, ltc3889 : vout0 - vout1 - * ltc7880 : vout0 - vout1 - * ltc3883 : vout0 - * ltm4664 : vout0 - vout1 - * ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1 - * ltm4680, ltm4686 : vout0 - vout1 - * ltm4700 : vout0 - vout1 - -Example: -ltc2978@5e { - compatible = "lltc,ltc2978"; - reg = <0x5e>; - regulators { - vout0 { - regulator-name = "FPGA-2.5V"; - }; - vout2 { - regulator-name = "FPGA-1.5V"; - }; - }; -};Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml new file +0
-0
Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml new file +7
-0@@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/lltc,ltc2972.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ltc2978
I know the original was bad, but we can do better here.
Quoted 90 lines
Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml new file +87
-0+ +maintainers: + - Jean Delvare <[email protected]> + +properties: + compatible: + enum: + - lltc,ltc2972 + - lltc,ltc2974 + - lltc,ltc2975 + - lltc,ltc2977 + - lltc,ltc2978 + - lltc,ltc2979 + - lltc,ltc2980 + - lltc,ltc3880 + - lltc,ltc3882 + - lltc,ltc3883 + - lltc,ltc3884 + - lltc,ltc3886 + - lltc,ltc3887 + - lltc,ltc3889 + - lltc,ltc7880 + - lltc,ltm2987 + - lltc,ltm4664 + - lltc,ltm4675 + - lltc,ltm4676 + - lltc,ltm4677 + - lltc,ltm4678 + - lltc,ltm4680 + - lltc,ltm4686 + - lltc,ltm4700 + + reg: + maxItems: 1 + + regulators: + type: object + description: | + list of regulators provided by this controller. + Valid names of regulators depend on number of supplies supported per device: + * ltc2972 vout0 - vout1 + * ltc2974, ltc2975 : vout0 - vout3 + * ltc2977, ltc2979, ltc2980, ltm2987 : vout0 - vout7 + * ltc2978 : vout0 - vout7 + * ltc3880, ltc3882, ltc3884, ltc3886, ltc3887, ltc3889 : vout0 - vout1 + * ltc7880 : vout0 - vout1 + * ltc3883 : vout0 + * ltm4664 : vout0 - vout1 + * ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1 + * ltm4680, ltm4686 : vout0 - vout1 + * ltm4700 : vout0 - vout1 + + patternProperties: + "^vout[0-7]$": + $ref: regulator.yaml# + type: object + unevaluatedProperties: false + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@5e { + compatible = "lltc,ltc2978"; + reg = <0x5e>; + + regulators { + vout0 { + regulator-name = "FPGA-2.5V"; + }; + vout2 { + regulator-name = "FPGA-1.5V"; + }; + }; + }; + }; +Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 6 lines · Rob Herring
Quoted 2 lines · Frank Li
delete mode 100644 Documentation/devicetree/bindings/hwmon/ltc2978.txt create mode 100644 Documentation/devicetree/bindings/regulator/lltc,ltc2972.yamlI'm on the fence whether to move this...
I don't really have feelings either way, I'm perfectly happy to move it.
Guenter Roeck
maintainerQuoted 18 lines · Rob Herring
Quoted 9 lines · Frank Li
Convert binding doc ltc2978.txt to yaml format.
Additional change:
- add i2c node.
- basic it is regulator according to example, move it under regulator.Fix below warning:
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: /soc/i2c@2000000/i2c-mux@77/i2c@2/regulator@5c:
failed to match any schema with compatible: ['lltc,ltc3882']Quoted 7 lines
Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/hwmon/ltc2978.txt | 62 ------------ .../bindings/regulator/lltc,ltc2972.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 62 deletions(-)delete mode 100644
Documentation/devicetree/bindings/hwmon/ltc2978.txtcreate mode 100644Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml
Quoted 2 lines
I'm on the fence whether to move this...
I don't really understand the rationale behind the move nor the rationale behind the rename, but then I don't really care or mind as long as no one claims that the _driver_ should be moved because the devicetree bindings moved.
Note that "basic it is a regulator" is a bit stretching. The driver's regulator functionality must be enabled with a separate configuration option; the driver works perfectly fine as hardware monitoring driver if SENSORS_LTC2978_REGULATOR=n.
Guenter
Frank Li
maintainerQuoted 19 lines · Guenter Roeck
Quoted 18 lines · Rob Herring
Quoted 16 lines · Frank Li
Convert binding doc ltc2978.txt to yaml format.
Additional change:
- add i2c node.
- basic it is regulator according to example, move it under regulator.Fix below warning:
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: /soc/i2c@2000000/i2c-mux@77/i2c@2/regulator@5c:
failed to match any schema with compatible: ['lltc,ltc3882']Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/hwmon/ltc2978.txt | 62 ------------ .../bindings/regulator/lltc,ltc2972.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 62 deletions(-)delete mode 100644
Documentation/devicetree/bindings/hwmon/ltc2978.txtcreate mode 100644Documentation/devicetree/bindings/regulator/lltc,ltc2972.yaml
Quoted 6 lines
Quoted 2 lines
I'm on the fence whether to move this...
I don't really understand the rationale behind the move nor the rationale behind the rename, but then I don't really care or mind as long as no one claims that the _driver_ should be moved because the devicetree bindings moved.
Conor suggest use one of compatible string as file name.
I just help convert it. I am not familar with this chip at all.
According to original docuemnt, most talk about regular instead of hwmon.
If you want to keep it under hwmon, I am fine.
Frank
Quoted 7 lines
Note that "basic it is a regulator" is a bit stretching. The driver's regulator functionality must be enabled with a separate configuration option; the driver works perfectly fine as hardware monitoring driver if SENSORS_LTC2978_REGULATOR=n.
Guenter
Guenter Roeck
maintainerQuoted 27 lines · Frank Li
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Rob Herring
Quoted 16 lines · Frank Li
Convert binding doc ltc2978.txt to yaml format.
Additional change:
- add i2c node.
- basic it is regulator according to example, move it under regulator.Fix below warning:
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: /soc/i2c@2000000/i2c-mux@77/i2c@2/regulator@5c:
failed to match any schema with compatible: ['lltc,ltc3882']Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/hwmon/ltc2978.txt | 62 ------------ .../bindings/regulator/lltc,ltc2972.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 62 deletions(-)delete mode 100644
Documentation/devicetree/bindings/hwmon/ltc2978.txtcreate mode 100644Documentation/devicetree/bindings/regulator/lltc,ltc2972.yamlQuoted 6 lines
Quoted 2 lines
I'm on the fence whether to move this...
I don't really understand the rationale behind the move nor the rationale behind the rename, but then I don't really care or mind as long as no one claims that the _driver_ should be moved because the devicetree bindings moved.
Quoted 8 lines
Conor suggest use one of compatible string as file name.
I just help convert it. I am not familar with this chip at all.
According to original docuemnt, most talk about regular instead of hwmon.
If you want to keep it under hwmon, I am fine.
Do whatever you want; I won't object. After all, it will be one less file in the scope of my responsibilities.
I would kindly suggest, though, that it might not be the best idea to list a hardware monitoring maintainer as maintainer of devicetree property definitions associated with the regulator subsystem. You might at least want to make sure that Jean is ok with being listed as maintainer of this file.
Thanks,
Guenter