twl4030_charger: add devicetree support.
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.
Signed-off-by NeilBrown <[email protected]>
Acked-by Kumar Gala <[email protected]>
Acked-by Grant Likely <[email protected]>
--
This version with correct property names and some Acked-by's.
- NB
Documentation/devicetree/bindings/power/twl-charger.txt new file +20 -0
@@ -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
@@ -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
Anton Vorontsov
AppliedQuoted 11 lines · NeilBrown
This allows the charger to be enabled with devicetree, and allows the parameters for charging the backup battery to be set.
Signed-off-by NeilBrown <[email protected]>Acked-by Kumar Gala <[email protected]>Acked-by Grant Likely <[email protected]>--
This version with correct property names and some Acked-by's.
- NB
Applied, thank you!