Skip to contentSkip to conversation

twl4030_charger: add devicetree support.

PATCH Applied NeilBrown 2 participants 2 messages Oct 31, 2013 – Nov 13, 2013 Device tree bindings

lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 twl4030_charger: add devicetree support.

This allows the charger to be enabled with devicetree, and allows the parameters for charging the backup battery to be set.

--
This version with correct property names and some Acked-by's.
- NB

Documentation/devicetree/bindings/power/twl-charger.txt new file +20 -0
new file mode 100644
index 000000000000..d5c706216df5
@@ -0,0 +1,20 @@
+TWL BCI (Battery Charger Interface)
+
+Required properties:
+- compatible:
+  - "ti,twl4030-bci"
+- interrupts: two interrupt lines from the TWL SIH (secondary
+  interrupt handler) - interrupts 9 and 2.
+
+Optional properties:
+- ti,bb-uvolt: microvolts for charging the backup battery.
+- ti,bb-uamp: microamps for charging the backup battery.
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   ti,bb-uvolt = <3200000>;
+   ti,bb-uamp = <150>;
+};
arch/arm/boot/dts/twl4030.dtsi +6 -0
index ae6a17aed9ee..5a12540b1d0f 100644
@@ -19,6 +19,12 @@
 		interrupts = <11>;
 	};
 
+	charger: bci {
+		compatible = "ti,twl4030-bci";
+		interrupts = <9>, <2>;
+		bci3v1-supply = <&vusb3v1>;
+	};
+
 	watchdog {
 		compatible = "ti,twl4030-wdt";
 	};
drivers/power/twl4030_charger.c +44 -3

78 lines not on this page · raw message