]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation
authorLiam Breck <kernel@networkimprov.net>
Wed, 7 Jun 2017 18:37:53 +0000 (11:37 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Thu, 8 Jun 2017 14:29:29 +0000 (16:29 +0200)
Document monitored-battery = <&battery_node>

Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Documentation/devicetree/bindings/power/supply/bq27xxx.txt

index b0c95ef63e68a2b5a32930c1c9061f68c0260e58..6858e1a804adaa55bcc91233e052d1b26d63bfa3 100644 (file)
@@ -1,7 +1,7 @@
-Binding for TI BQ27XXX fuel gauge family
+TI BQ27XXX fuel gauge family
 
 Required properties:
-- compatible: Should contain one of the following:
+- compatible: contains one of the following:
  * "ti,bq27200" - BQ27200
  * "ti,bq27210" - BQ27210
  * "ti,bq27500" - deprecated, use revision specific property below
@@ -26,11 +26,28 @@ Required properties:
  * "ti,bq27425" - BQ27425
  * "ti,bq27441" - BQ27441
  * "ti,bq27621" - BQ27621
-- reg: integer, i2c address of the device.
+- 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:
 
-bq27510g3 {
-    compatible = "ti,bq27510g3";
-    reg = <0x55>;
-};
+       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>;
+       };