Thread (2 messages) flat view 2 messages, 2 authors, 2017-02-11

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

From: Liam Breck <hidden>
Date: 2017-02-11 02:03:41
Also in: linux-pm

On Wed, Feb 8, 2017 at 1:58 PM, Rob Herring [off-list ref] wrote:
On Sat, Feb 04, 2017 at 01:15:56AM -0800, Liam Breck wrote:
quoted
From: Matt Ranostay <redacted>

From: Matt Ranostay <redacted>

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.
I hope this is a common binding and not yet another battery binding.
Yes, Sebastian had us add support for this in power_supply_core with

int power_supply_get_battery_info(
  struct power_supply *psy,
  struct power_suppy_battery_info *info)

quoted
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.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"
The "fixed" part seems a bit pointless. Just "battery" would be a
bit generic. Don't you need to know the battery chemistry typically? Or
number of cells?
Sebastian suggested fixed-battery to indicate a non-smart battery,
i.e. a pack without self-awareness besides a protection circuit.

I don't know what compatible would have for a smart battery. That
might be useful to establish now...

I'll be posting v6 shortly, with no change re compatible.

~.~
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help