Skip to contentSkip to conversation

twl4030_charger: add devicetree support.

PATCH In review NeilBrown 3 participants 5 messages Oct 24, 2013 – Oct 25, 2013 Device tree bindings

lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 twl4030_charger: add devicetree support.

[my first device-tree related patch. Please let me know what I got wrong so I wont repeat the mistake in all the others I have queued]

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

Documentation/devicetree/bindings/power/twl-charger.txt new file +20 -0
new file mode 100644
index 0000000..8afaa9a
@@ -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:
+- bb-uvolt: microvolts for charging the backup battery.
+- bb-uamp: microamps for charging the backup battery.
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   bb-uvolt = <3200000>;
+   bb-uamp = <150>;
+};
arch/arm/boot/dts/twl4030.dtsi +6 -0
index ae6a17a..5a12540 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

#1 lore raw
Quoted 16 lines · NeilBrown

[my first device-tree related patch. Please let me know what I got wrong so I wont repeat the mistake in all the others I have queued]

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

Documentation/devicetree/bindings/power/twl-charger.txt new file +1 -0
new file mode 100644
index 0000000..8afaa9a
@@ -0,0 +1,20 @@
+TWL BCI (Battery Charger Interface)

Documentation/devicetree/bindings/power/twl-charger.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +10 -0
+
+Required properties:
+- compatible:
+  - "ti,twl4030-bci"
+- interrupts: two interrupt lines from the TWL SIH (secondary
+  interrupt handler) - interrupts 9 and 2.
+
+Optional properties:
+- bb-uvolt: microvolts for charging the backup battery.
+- bb-uamp: microamps for charging the backup battery.

prop should have vendor prefix.

ti,bb-uvolt, ti,bb-uamp

- k

Quoted 9 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +9 -0
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   bb-uvolt = <3200000>;
+   bb-uamp = <150>;
+};
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Acked-by
#2 lore raw
Quoted 32 lines · Kumar Gala
Quoted 16 lines · NeilBrown

[my first device-tree related patch. Please let me know what I got wrong so I wont repeat the mistake in all the others I have queued]

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

Documentation/devicetree/bindings/power/twl-charger.txt new file +1 -0
new file mode 100644
index 0000000..8afaa9a
@@ -0,0 +1,20 @@
+TWL BCI (Battery Charger Interface)

Documentation/devicetree/bindings/power/twl-charger.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +10 -0
+
+Required properties:
+- compatible:
+  - "ti,twl4030-bci"
+- interrupts: two interrupt lines from the TWL SIH (secondary
+  interrupt handler) - interrupts 9 and 2.
+
+Optional properties:
+- bb-uvolt: microvolts for charging the backup battery.
+- bb-uamp: microamps for charging the backup battery.

prop should have vendor prefix.

Quoted 1 line

ti,bb-uvolt, ti,bb-uamp

Agreed. Otherwise:

Quoted 17 lines

- k

Quoted 9 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +9 -0
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   bb-uvolt = <3200000>;
+   bb-uamp = <150>;
+};
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
author
#3 lore raw
Quoted 33 lines · On Thu, 24 Oct 2013 11:06:52 +0100 Grant Likely <[email protected]> wrote:
Quoted 32 lines · Kumar Gala
Quoted 16 lines · NeilBrown

[my first device-tree related patch. Please let me know what I got wrong so I wont repeat the mistake in all the others I have queued]

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

Documentation/devicetree/bindings/power/twl-charger.txt new file +1 -0
new file mode 100644
index 0000000..8afaa9a
@@ -0,0 +1,20 @@
+TWL BCI (Battery Charger Interface)

Documentation/devicetree/bindings/power/twl-charger.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +10 -0
+
+Required properties:
+- compatible:
+  - "ti,twl4030-bci"
+- interrupts: two interrupt lines from the TWL SIH (secondary
+  interrupt handler) - interrupts 9 and 2.
+
+Optional properties:
+- bb-uvolt: microvolts for charging the backup battery.
+- bb-uamp: microamps for charging the backup battery.

prop should have vendor prefix.

Quoted 3 lines
Quoted 1 line

ti,bb-uvolt, ti,bb-uamp

Agreed. Otherwise:

OK, I'll do that - thanks.

NeilBrown

Quoted 20 lines
Quoted 17 lines

- k

Quoted 9 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +9 -0
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   bb-uvolt = <3200000>;
+   bb-uamp = <150>;
+};
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Acked-by
#4 lore raw
Quoted 36 lines · NeilBrown
Quoted 33 lines · On Thu, 24 Oct 2013 11:06:52 +0100 Grant Likely <[email protected]> wrote:
Quoted 32 lines · Kumar Gala
Quoted 16 lines · NeilBrown

[my first device-tree related patch. Please let me know what I got wrong so I wont repeat the mistake in all the others I have queued]

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

Documentation/devicetree/bindings/power/twl-charger.txt new file +1 -0
new file mode 100644
index 0000000..8afaa9a
@@ -0,0 +1,20 @@
+TWL BCI (Battery Charger Interface)

Documentation/devicetree/bindings/power/twl-charger.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +10 -0
+
+Required properties:
+- compatible:
+  - "ti,twl4030-bci"
+- interrupts: two interrupt lines from the TWL SIH (secondary
+  interrupt handler) - interrupts 9 and 2.
+
+Optional properties:
+- bb-uvolt: microvolts for charging the backup battery.
+- bb-uamp: microamps for charging the backup battery.

prop should have vendor prefix.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

ti,bb-uvolt, ti,bb-uamp

Agreed. Otherwise:

OK, I'll do that - thanks.

NeilBrown

Ditto on the Ack once these changes are made:

- k

Quoted 22 lines
Quoted 21 lines
Quoted 17 lines

- k

Quoted 9 lines
Documentation/devicetree/bindings/power/twl-charger.txt new file +9 -0
+
+Examples:
+
+bci {
+   compatible = "ti,twl4030-bci";
+   interrupts = <9>, <2>;
+   bb-uvolt = <3200000>;
+   bb-uamp = <150>;
+};
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Signature · 2 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation