dt-bindings: power: Convert bq27xxx dt to yaml
Subsystems (2)
PATCH 1/1 dt-bindings: power: Convert bq27xxx dt to yaml
Convert the bq27xxx.txt to yaml format
--- .../bindings/power/supply/bq27xxx.txt | 56 ----------- .../bindings/power/supply/bq27xxx.yaml | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 56 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/supply/bq27xxx.txt create mode 100644 Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
Documentation/devicetree/bindings/power/supply/bq27xxx.txt deleted +0 -56
@@ -1,56 +0,0 @@ -TI BQ27XXX fuel gauge family - -Required properties: -- compatible: contains one of the following: - * "ti,bq27200" - BQ27200 - * "ti,bq27210" - BQ27210 - * "ti,bq27500" - deprecated, use revision specific property below - * "ti,bq27510" - deprecated, use revision specific property below - * "ti,bq27520" - deprecated, use revision specific property below - * "ti,bq27500-1" - BQ27500/1 - * "ti,bq27510g1" - BQ27510-g1 - * "ti,bq27510g2" - BQ27510-g2 - * "ti,bq27510g3" - BQ27510-g3 - * "ti,bq27520g1" - BQ27520-g1 - * "ti,bq27520g2" - BQ27520-g2 - * "ti,bq27520g3" - BQ27520-g3 - * "ti,bq27520g4" - BQ27520-g4 - * "ti,bq27521" - BQ27521 - * "ti,bq27530" - BQ27530 - * "ti,bq27531" - BQ27531 - * "ti,bq27541" - BQ27541 - * "ti,bq27542" - BQ27542 - * "ti,bq27546" - BQ27546 - * "ti,bq27742" - BQ27742 - * "ti,bq27545" - BQ27545 - * "ti,bq27411" - BQ27411 - * "ti,bq27421" - BQ27421 - * "ti,bq27425" - BQ27425 - * "ti,bq27426" - BQ27426 - * "ti,bq27441" - BQ27441 - * "ti,bq27621" - BQ27621 -- reg: integer, I2C address of the fuel gauge. - -Optional properties: -- monitored-battery: phandle of battery characteristics node - The fuel gauge uses the following battery properties: - + energy-full-design-microwatt-hours - + charge-full-design-microamp-hours - + voltage-min-design-microvolt - Both or neither of the *-full-design-*-hours properties must be set. - See Documentation/devicetree/bindings/power/supply/battery.txt - -Example: - - bat: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3200000>; - energy-full-design-microwatt-hours = <5290000>; - charge-full-design-microamp-hours = <1430000>; - }; - - bq27510g3: fuel-gauge@55 { - compatible = "ti,bq27510g3"; - reg = <0x55>; - monitored-battery = <&bat>; - };
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +95 -0
95 lines not on this page · raw message
Signature · 1 line
2.25.1
Adding Andrew in manually.
Quoted 175 lines · Dan Murphy
Convert the bq27xxx.txt to yaml format
CC Pali Rohár <[email protected]>CC Andrew F. Davis" <[email protected]>Signed-off-by Dan Murphy <[email protected]>--- .../bindings/power/supply/bq27xxx.txt | 56 ----------- .../bindings/power/supply/bq27xxx.yaml | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 56 deletions(-)delete mode 100644
Documentation/devicetree/bindings/power/supply/bq27xxx.txtcreate mode 100644Documentation/devicetree/bindings/power/supply/bq27xxx.yamlDocumentation/devicetree/bindings/power/supply/bq27xxx.txt deleted +0
-56@@ -1,56 +0,0 @@ -TI BQ27XXX fuel gauge family - -Required properties: -- compatible: contains one of the following: - * "ti,bq27200" - BQ27200 - * "ti,bq27210" - BQ27210 - * "ti,bq27500" - deprecated, use revision specific property below - * "ti,bq27510" - deprecated, use revision specific property below - * "ti,bq27520" - deprecated, use revision specific property below - * "ti,bq27500-1" - BQ27500/1 - * "ti,bq27510g1" - BQ27510-g1 - * "ti,bq27510g2" - BQ27510-g2 - * "ti,bq27510g3" - BQ27510-g3 - * "ti,bq27520g1" - BQ27520-g1 - * "ti,bq27520g2" - BQ27520-g2 - * "ti,bq27520g3" - BQ27520-g3 - * "ti,bq27520g4" - BQ27520-g4 - * "ti,bq27521" - BQ27521 - * "ti,bq27530" - BQ27530 - * "ti,bq27531" - BQ27531 - * "ti,bq27541" - BQ27541 - * "ti,bq27542" - BQ27542 - * "ti,bq27546" - BQ27546 - * "ti,bq27742" - BQ27742 - * "ti,bq27545" - BQ27545 - * "ti,bq27411" - BQ27411 - * "ti,bq27421" - BQ27421 - * "ti,bq27425" - BQ27425 - * "ti,bq27426" - BQ27426 - * "ti,bq27441" - BQ27441 - * "ti,bq27621" - BQ27621 -- reg: integer, I2C address of the fuel gauge. - -Optional properties: -- monitored-battery: phandle of battery characteristics node - The fuel gauge uses the following battery properties: - + energy-full-design-microwatt-hours - + charge-full-design-microamp-hours - + voltage-min-design-microvolt - Both or neither of the *-full-design-*-hours properties must be set. - See Documentation/devicetree/bindings/power/supply/battery.txt - -Example: - - bat: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3200000>; - energy-full-design-microwatt-hours = <5290000>; - charge-full-design-microamp-hours = <1430000>; - }; - - bq27510g3: fuel-gauge@55 { - compatible = "ti,bq27510g3"; - reg = <0x55>; - monitored-battery = <&bat>; - };Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +95
-0@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2020 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/bq27xxx.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: TI BQ27XXX fuel gauge family + +maintainers: + - Pali Rohár <[email protected]> + - Andrew F. Davis" <[email protected]> + - Sebastian Reichel <[email protected]> + +description: | + Support various Texas Instruments fuel gauge devices that share similar + register maps and power supply properties + +properties: + compatible: + enum: + - ti,bq27200 - BQ27200 + - ti,bq27210 - BQ27210 + - ti,bq27500 - deprecated, use revision specific property below + - ti,bq27510 - deprecated, use revision specific property below + - ti,bq27520 - deprecated, use revision specific property below + - ti,bq27500-1 - BQ27500/1 + - ti,bq27510g1 - BQ27510-g1 + - ti,bq27510g2 - BQ27510-g2 + - ti,bq27510g3 - BQ27510-g3 + - ti,bq27520g1 - BQ27520-g1 + - ti,bq27520g2 - BQ27520-g2 + - ti,bq27520g3 - BQ27520-g3 + - ti,bq27520g4 - BQ27520-g4 + - ti,bq27521 - BQ27521 + - ti,bq27530 - BQ27530 + - ti,bq27531 - BQ27531 + - ti,bq27541 - BQ27541 + - ti,bq27542 - BQ27542 + - ti,bq27546 - BQ27546 + - ti,bq27742 - BQ27742 + - ti,bq27545 - BQ27545 + - ti,bq27411 - BQ27411 + - ti,bq27421 - BQ27421 + - ti,bq27425 - BQ27425 + - ti,bq27426 - BQ27426 + - ti,bq27441 - BQ27441 + - ti,bq27621 - BQ27621 + + reg: + maxItems: 1 + description: integer, I2C address of the fuel gauge. + + monitored-battery: + description: phandle of battery characteristics node + + energy-full-design-microwatt-hours: + description: | + See Documentation/devicetree/bindings/power/supply/battery.txt. + If this property is set then charge-full-design-microamp-hours must be + set as well. + + charge-full-design-microamp-hours: + description: | + See Documentation/devicetree/bindings/power/supply/battery.txt. + If this property is set then energy-full-design-microwatt-hours must be + set as well. + + voltage-min-design-microvolt: + description: | + See Documentation/devicetree/bindings/power/supply/battery.txt. + +required: + - compatible + - reg +additionalProperties: false + +examples: + - | + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + bat: battery { + compatible = "simple-battery"; + voltage-min-design-microvolt = <3200000>; + energy-full-design-microwatt-hours = <5290000>; + charge-full-design-microamp-hours = <1430000>; + }; + + bq27510g3: fuel-gauge@55 { + compatible = "ti,bq27510g3"; + reg = <0x55>; + monitored-battery = <&bat>; + }; + };
Quoted 93 lines · Dan Murphy
Adding Andrew in manually.
Quoted 90 lines · Dan Murphy
Convert the bq27xxx.txt to yaml format
CC Pali Rohár <[email protected]>CC Andrew F. Davis" <[email protected]>Signed-off-by Dan Murphy <[email protected]>---
.../bindings/power/supply/bq27xxx.txt | 56 ----------- .../bindings/power/supply/bq27xxx.yaml | 95 +++++++++++++++++++2 files changed, 95 insertions(+), 56 deletions(-)delete mode 100644
Documentation/devicetree/bindings/power/supply/bq27xxx.txtcreate mode 100644Documentation/devicetree/bindings/power/supply/bq27xxx.yamldiff --git
a/Documentation/devicetree/bindings/power/supply/bq27xxx.txtb/Documentation/devicetree/bindings/power/supply/bq27xxx.txtdeleted file mode 100644
index 4fa8e08df2b6..000000000000Documentation/devicetree/bindings/power/supply/bq27xxx.txt deleted +0
-56@@ -1,56 +0,0 @@ -TI BQ27XXX fuel gauge family - -Required properties: -- compatible: contains one of the following: - * "ti,bq27200" - BQ27200 - * "ti,bq27210" - BQ27210 - * "ti,bq27500" - deprecated, use revision specific property below - * "ti,bq27510" - deprecated, use revision specific property below - * "ti,bq27520" - deprecated, use revision specific property below - * "ti,bq27500-1" - BQ27500/1 - * "ti,bq27510g1" - BQ27510-g1 - * "ti,bq27510g2" - BQ27510-g2 - * "ti,bq27510g3" - BQ27510-g3 - * "ti,bq27520g1" - BQ27520-g1 - * "ti,bq27520g2" - BQ27520-g2 - * "ti,bq27520g3" - BQ27520-g3 - * "ti,bq27520g4" - BQ27520-g4 - * "ti,bq27521" - BQ27521 - * "ti,bq27530" - BQ27530 - * "ti,bq27531" - BQ27531 - * "ti,bq27541" - BQ27541 - * "ti,bq27542" - BQ27542 - * "ti,bq27546" - BQ27546 - * "ti,bq27742" - BQ27742 - * "ti,bq27545" - BQ27545 - * "ti,bq27411" - BQ27411 - * "ti,bq27421" - BQ27421 - * "ti,bq27425" - BQ27425 - * "ti,bq27426" - BQ27426 - * "ti,bq27441" - BQ27441 - * "ti,bq27621" - BQ27621 -- reg: integer, I2C address of the fuel gauge. - -Optional properties: -- monitored-battery: phandle of battery characteristics node - The fuel gauge uses the following battery properties: - + energy-full-design-microwatt-hours - + charge-full-design-microamp-hours - + voltage-min-design-microvolt - Both or neither of the *-full-design-*-hours properties must be set. - See Documentation/devicetree/bindings/power/supply/battery.txt - -Example: - - bat: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3200000>; - energy-full-design-microwatt-hours = <5290000>; - charge-full-design-microamp-hours = <1430000>; - }; - - bq27510g3: fuel-gauge@55 { - compatible = "ti,bq27510g3"; - reg = <0x55>; - monitored-battery = <&bat>; - };diff --git
a/Documentation/devicetree/bindings/power/supply/bq27xxx.yamlb/Documentation/devicetree/bindings/power/supply/bq27xxx.yamlnew file mode 100644
index 000000000000..6c53ee849004Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +4
-0@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2020 Texas Instruments Incorporated +%YAML 1.2 +---
Quoted 8 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml line 12
Quoted 8 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +8
-0+$id: "http://devicetree.org/schemas/power/supply/bq27xxx.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: TI BQ27XXX fuel gauge family + +maintainers: + - Pali Rohár <[email protected]> + - Andrew F. Davis" <[email protected]>
Extra " at end of name.
Quoted 43 lines
Quoted 43 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +4
-0+ - Sebastian Reichel <[email protected]> + +description: | + Support various Texas Instruments fuel gauge devices that sharesimilar
+ register maps and power supply propertiesDocumentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +37
-0+ +properties: + compatible: + enum: + - ti,bq27200 - BQ27200 + - ti,bq27210 - BQ27210 + - ti,bq27500 - deprecated, use revision specific property below + - ti,bq27510 - deprecated, use revision specific property below + - ti,bq27520 - deprecated, use revision specific property below + - ti,bq27500-1 - BQ27500/1 + - ti,bq27510g1 - BQ27510-g1 + - ti,bq27510g2 - BQ27510-g2 + - ti,bq27510g3 - BQ27510-g3 + - ti,bq27520g1 - BQ27520-g1 + - ti,bq27520g2 - BQ27520-g2 + - ti,bq27520g3 - BQ27520-g3 + - ti,bq27520g4 - BQ27520-g4 + - ti,bq27521 - BQ27521 + - ti,bq27530 - BQ27530 + - ti,bq27531 - BQ27531 + - ti,bq27541 - BQ27541 + - ti,bq27542 - BQ27542 + - ti,bq27546 - BQ27546 + - ti,bq27742 - BQ27742 + - ti,bq27545 - BQ27545 + - ti,bq27411 - BQ27411 + - ti,bq27421 - BQ27421 + - ti,bq27425 - BQ27425 + - ti,bq27426 - BQ27426 + - ti,bq27441 - BQ27441 + - ti,bq27621 - BQ27621 + + reg: + maxItems: 1 + description: integer, I2C address of the fuel gauge. + + monitored-battery:
Quoted 8 lines
Quoted 8 lines
+ description: phandle of battery characteristics node
+
+ energy-full-design-microwatt-hours:
+ description: |
+ SeeDocumentation/devicetree/bindings/power/supply/battery.txt. + If this property is set then charge-full-design-microamp-hours must be
+ set as well.
These are properties of the battery node and should be described in their binding, they are not part of the fuel gauge node here.
Andrew
Quoted 35 lines
Quoted 35 lines
+
+ charge-full-design-microamp-hours:
+ description: |
+ SeeDocumentation/devicetree/bindings/power/supply/battery.txt. + If this property is set then energy-full-design-microwatt-hours must be
+ set as well.Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +28
-0+ + voltage-min-design-microvolt: + description: | + See Documentation/devicetree/bindings/power/supply/battery.txt. + +required: + - compatible + - reg +additionalProperties: false + +examples: + - | + i2c0 { + #address-cells = <1>; + #size-cells = <0>; + bat: battery { + compatible = "simple-battery"; + voltage-min-design-microvolt = <3200000>; + energy-full-design-microwatt-hours = <5290000>; + charge-full-design-microamp-hours = <1430000>; + }; + + bq27510g3: fuel-gauge@55 { + compatible = "ti,bq27510g3"; + reg = <0x55>; + monitored-battery = <&bat>; + }; + };
Andrew
Quoted 96 lines · Andrew F. Davis
Quoted 95 lines · Dan Murphy
Adding Andrew in manually.
Quoted 92 lines · Dan Murphy
Convert the bq27xxx.txt to yaml format
CC Pali Rohár <[email protected]>CC Andrew F. Davis" <[email protected]>Signed-off-by Dan Murphy <[email protected]>--- .../bindings/power/supply/bq27xxx.txt | 56 ----------- .../bindings/power/supply/bq27xxx.yaml | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 56 deletions(-)delete mode 100644
Documentation/devicetree/bindings/power/supply/bq27xxx.txt
create mode 100644Documentation/devicetree/bindings/power/supply/bq27xxx.yamldiff --git
a/Documentation/devicetree/bindings/power/supply/bq27xxx.txtb/Documentation/devicetree/bindings/power/supply/bq27xxx.txtdeleted file mode 100644
index 4fa8e08df2b6..000000000000Documentation/devicetree/bindings/power/supply/bq27xxx.txt deleted +0
-56@@ -1,56 +0,0 @@ -TI BQ27XXX fuel gauge family - -Required properties: -- compatible: contains one of the following: - * "ti,bq27200" - BQ27200 - * "ti,bq27210" - BQ27210 - * "ti,bq27500" - deprecated, use revision specific property below - * "ti,bq27510" - deprecated, use revision specific property below - * "ti,bq27520" - deprecated, use revision specific property below - * "ti,bq27500-1" - BQ27500/1 - * "ti,bq27510g1" - BQ27510-g1 - * "ti,bq27510g2" - BQ27510-g2 - * "ti,bq27510g3" - BQ27510-g3 - * "ti,bq27520g1" - BQ27520-g1 - * "ti,bq27520g2" - BQ27520-g2 - * "ti,bq27520g3" - BQ27520-g3 - * "ti,bq27520g4" - BQ27520-g4 - * "ti,bq27521" - BQ27521 - * "ti,bq27530" - BQ27530 - * "ti,bq27531" - BQ27531 - * "ti,bq27541" - BQ27541 - * "ti,bq27542" - BQ27542 - * "ti,bq27546" - BQ27546 - * "ti,bq27742" - BQ27742 - * "ti,bq27545" - BQ27545 - * "ti,bq27411" - BQ27411 - * "ti,bq27421" - BQ27421 - * "ti,bq27425" - BQ27425 - * "ti,bq27426" - BQ27426 - * "ti,bq27441" - BQ27441 - * "ti,bq27621" - BQ27621 -- reg: integer, I2C address of the fuel gauge. - -Optional properties: -- monitored-battery: phandle of battery characteristics node - The fuel gauge uses the following battery properties: - + energy-full-design-microwatt-hours - + charge-full-design-microamp-hours - + voltage-min-design-microvolt - Both or neither of the *-full-design-*-hours properties must be set. - See Documentation/devicetree/bindings/power/supply/battery.txt - -Example: - - bat: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3200000>; - energy-full-design-microwatt-hours = <5290000>; - charge-full-design-microamp-hours = <1430000>; - }; - - bq27510g3: fuel-gauge@55 { - compatible = "ti,bq27510g3"; - reg = <0x55>; - monitored-battery = <&bat>; - };diff --git
a/Documentation/devicetree/bindings/power/supply/bq27xxx.yamlb/Documentation/devicetree/bindings/power/supply/bq27xxx.yamlnew file mode 100644
index 000000000000..6c53ee849004Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +6
-0@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2020 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/bq27xxx.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
Quoted 9 lines
Quoted 6 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml line 12
Quoted 6 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +6
-0+ +title: TI BQ27XXX fuel gauge family + +maintainers: + - Pali Rohár <[email protected]> + - Andrew F. Davis" <[email protected]>Extra " at end of name.
Ack
Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +4
-0+ - Sebastian Reichel <[email protected]> + +description: | + Support various Texas Instruments fuel gauge devices that sharesimilar
+ register maps and power supply propertiesDocumentation/devicetree/bindings/power/supply/bq27xxx.yaml new file +40
-0+ +properties: + compatible: + enum: + - ti,bq27200 - BQ27200 + - ti,bq27210 - BQ27210 + - ti,bq27500 - deprecated, use revision specific property below + - ti,bq27510 - deprecated, use revision specific property below + - ti,bq27520 - deprecated, use revision specific property below + - ti,bq27500-1 - BQ27500/1 + - ti,bq27510g1 - BQ27510-g1 + - ti,bq27510g2 - BQ27510-g2 + - ti,bq27510g3 - BQ27510-g3 + - ti,bq27520g1 - BQ27520-g1 + - ti,bq27520g2 - BQ27520-g2 + - ti,bq27520g3 - BQ27520-g3 + - ti,bq27520g4 - BQ27520-g4 + - ti,bq27521 - BQ27521 + - ti,bq27530 - BQ27530 + - ti,bq27531 - BQ27531 + - ti,bq27541 - BQ27541 + - ti,bq27542 - BQ27542 + - ti,bq27546 - BQ27546 + - ti,bq27742 - BQ27742 + - ti,bq27545 - BQ27545 + - ti,bq27411 - BQ27411 + - ti,bq27421 - BQ27421 + - ti,bq27425 - BQ27425 + - ti,bq27426 - BQ27426 + - ti,bq27441 - BQ27441 + - ti,bq27621 - BQ27621 + + reg: + maxItems: 1 + description: integer, I2C address of the fuel gauge. + + monitored-battery: + description: phandle of battery characteristics node + + energy-full-design-microwatt-hours:
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
+ description: |
+ SeeDocumentation/devicetree/bindings/power/supply/battery.txt. + If this property is set then charge-full-design-microamp-hours must be
+ set as well.These are properties of the battery node and should be described in their binding, they are not part of the fuel gauge node here.
OK. I will add the explanation back from the original text file that these are used by the fuel gauge from the battery node.
Dan