diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2013-05-10 03:17:51 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-06-06 20:19:54 -0400 |
commit | 17b4565b308ed31fa20b59842c75e685a101dc8a (patch) | |
tree | 6f6462adc90736ce91d57bffc5c6b73865bda56e /Documentation/devicetree | |
parent | 0f1e0169e08e1645a8406ab84286ebaf19c5cce5 (diff) |
lp8727_charger: Support the device tree feature
The interrupt and charging parameters are configurable in the device tree
structure. In the board test, a GPIO is used for handling LP8727
interrupts. The device tree binding documentation is added also.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/power_supply/lp8727_charger.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt b/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt new file mode 100644 index 000000000000..2246bc5c874b --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | Binding for TI/National Semiconductor LP8727 Charger | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,lp8727" | ||
5 | - reg: I2C slave address 27h | ||
6 | |||
7 | Optional properties: | ||
8 | - interrupt-parent: interrupt controller node (see interrupt binding[0]) | ||
9 | - interrupts: interrupt specifier (see interrupt binding[0]) | ||
10 | - debounce-ms: interrupt debounce time. (u32) | ||
11 | |||
12 | AC and USB charging parameters | ||
13 | - charger-type: "ac" or "usb" (string) | ||
14 | - eoc-level: value of 'enum lp8727_eoc_level' (u8) | ||
15 | - charging-current: value of 'enum lp8727_ichg' (u8) | ||
16 | |||
17 | [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
18 | |||
19 | Example) | ||
20 | |||
21 | lp8727@27 { | ||
22 | compatible = "ti,lp8727"; | ||
23 | reg = <0x27>; | ||
24 | |||
25 | /* GPIO 134 is used for LP8728 interrupt pin */ | ||
26 | interrupt-parent = <&gpio5>; /* base = 128 */ | ||
27 | interrupts = <6 0x2>; /* offset = 6, falling edge type */ | ||
28 | |||
29 | debounce-ms = <300>; | ||
30 | |||
31 | /* AC charger: 5% EOC and 500mA charging current */ | ||
32 | ac { | ||
33 | charger-type = "ac"; | ||
34 | eoc-level = /bits/ 8 <0>; | ||
35 | charging-current = /bits/ 8 <4>; | ||
36 | }; | ||
37 | |||
38 | /* USB charger: 10% EOC and 400mA charging current */ | ||
39 | usb { | ||
40 | charger-type = "usb"; | ||
41 | eoc-level = /bits/ 8 <1>; | ||
42 | charging-current = /bits/ 8 <2>; | ||
43 | }; | ||
44 | }; | ||