Thread (1 message) 1 message, 1 author, 2017-02-04

Re: [PATCH v5 1/8] devicetree: power: Add battery.txt

From: Matt Ranostay <hidden>
Date: 2017-02-04 10:03:06
Also in: linux-pm

On Sat, Feb 4, 2017 at 1:15 AM, Liam Breck [off-list ref] wrote:
From: Matt Ranostay <redacted>

From: Matt Ranostay <redacted>
How are the double from me happening? :)  Seems odds
quoted hunk
Documentation of static battery characteristics that can be defined
for batteries which cannot self-identify. This information is required
by fuel-gauge and charger chips for proper handling of the battery.

Cc: Rob Herring <redacted>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Matt Ranostay <redacted>
Signed-off-by: Liam Breck <redacted>
---
 .../devicetree/bindings/power/supply/battery.txt   | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/battery.txt
diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt
new file mode 100644
index 0000000..d663c48
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/battery.txt
@@ -0,0 +1,39 @@
+Battery Characteristics
+
+Required Properties:
+ - compatible: Must be "fixed-battery"
+
+Optional Properties:
+ - voltage-min-design-microvolt: drained battery voltage
+ - voltage-max-design-microvolt: charged battery voltage
+ - energy-full-design-microwatt-hours: battery design energy
+ - charge-full-design-microamp-hours: battery design capacity
+
+Future Properties must be named for the corresponding elements in
+enum power_supply_property, defined in include/linux/power_supply.h.
+
+Batteries must be referenced by chargers and/or fuel-gauges
+using a phandle. The phandle's property should be named
+"monitored-battery".
+
+Example:
+
+       bat: battery {
+               compatible = "fixed-battery";
+               voltage-min-design-microvolt = <3200000>;
+               voltage-max-design-microvolt = <4200000>;
+               energy-full-design-microwatt-hours = <5290000>;
+               charge-full-design-microamp-hours = <1430000>;
+       };
+
+       charger: charger@0 {
+               ....
+               monitored-battery = <&bat>;
+               ...
+       };
+
+       fuel_gauge: fuel_gauge@0 {
+               ....
+               monitored-battery = <&bat>;
+               ...
+       };
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help