Thread (1 message) 1 message, 1 author, 2017-05-23

Re: [PATCH] power: supply: cpcap-battery: Add a battery driver

From: Tony Lindgren <hidden>
Date: 2017-05-23 00:38:32
Also in: linux-omap, linux-pm

* Tony Lindgren [off-list ref] [170520 10:09]:
* Tony Lindgren [off-list ref] [170518 22:55]:
quoted
Note that I left out the battery interrupt handling for now as I need
to spend more time on it for the battery empty interrupts. The driver
works just fine without the interrupts too.
...
quoted
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/cpcap-battery.txt
@@ -0,0 +1,27 @@
+Motorola CPCAP PMIC battery driver binding
+
+Required properties:
+- compatible: Shall be "motorola,cpcap-battery"
+- interrupts: Interrupt specifier for each name in interrupt-names
+- interrupt-names: Should contain the following entries:
+		   "lowbph", "lowbpl", "chrgcurr1", "battdetb"
+- io-channels: IIO ADC channel specifier for each name in io-channel-names
+- io-channel-names: Should contain the following entries:
+		    "battdetb", "battp"
+
+Example:
+
+cpcap_battery: battery {
+	compatible = "motorola,cpcap-battery";
+	interrupts-extended = <
+		&cpcap 5 0 &cpcap 3 0
+		&cpcap 20 0 &cpcap 54 0
+	>;
+	interrupt-names =
+		"lowbph", "lowbpl",
+		"chrgcurr1", "battdetb";
+	io-channels = <&cpcap_adc 0 &cpcap_adc 1
+		       &cpcap_adc 5 &cpcap_adc 6>;
+	io-channel-names = "battdetb", "battp",
+			   "chg_isense", "batti";
+};
I guess we should leave out the interrupts in the binding for now
too. Or at least move them to optional properties.
Never mind, I got the battery low interrupts finally working. Will
post v2 with interrupts shortly.

Regards,

Tony
--
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