Commit | Line | Data |
---|---|---|
620b2736 | 1 | /* |
f7bae49a | 2 | * LP8727 Micro/Mini USB IC with integrated charger |
e39b828f KM |
3 | * |
4 | * Copyright (C) 2011 Texas Instruments | |
620b2736 KM |
5 | * Copyright (C) 2011 National Semiconductor |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License version 2 as | |
9 | * published by the Free Software Foundation. | |
620b2736 KM |
10 | */ |
11 | ||
12 | #ifndef _LP8727_H | |
13 | #define _LP8727_H | |
14 | ||
15 | enum lp8727_eoc_level { | |
6029719f KM |
16 | LP8727_EOC_5P, |
17 | LP8727_EOC_10P, | |
18 | LP8727_EOC_16P, | |
19 | LP8727_EOC_20P, | |
20 | LP8727_EOC_25P, | |
21 | LP8727_EOC_33P, | |
22 | LP8727_EOC_50P, | |
620b2736 KM |
23 | }; |
24 | ||
25 | enum lp8727_ichg { | |
6029719f KM |
26 | LP8727_ICHG_90mA, |
27 | LP8727_ICHG_100mA, | |
28 | LP8727_ICHG_400mA, | |
29 | LP8727_ICHG_450mA, | |
30 | LP8727_ICHG_500mA, | |
31 | LP8727_ICHG_600mA, | |
32 | LP8727_ICHG_700mA, | |
33 | LP8727_ICHG_800mA, | |
34 | LP8727_ICHG_900mA, | |
35 | LP8727_ICHG_1000mA, | |
620b2736 KM |
36 | }; |
37 | ||
9b11adc7 KM |
38 | /** |
39 | * struct lp8727_chg_param | |
40 | * @eoc_level : end of charge level setting | |
b9633ef1 | 41 | * @ichg : charging current |
9b11adc7 | 42 | */ |
620b2736 | 43 | struct lp8727_chg_param { |
620b2736 | 44 | enum lp8727_eoc_level eoc_level; |
620b2736 KM |
45 | enum lp8727_ichg ichg; |
46 | }; | |
47 | ||
9b11adc7 KM |
48 | /** |
49 | * struct lp8727_platform_data | |
b9633ef1 KM |
50 | * @get_batt_present : check battery status - exists or not |
51 | * @get_batt_level : get battery voltage (mV) | |
9b11adc7 | 52 | * @get_batt_capacity : get battery capacity (%) |
b9633ef1 | 53 | * @get_batt_temp : get battery temperature |
318cb389 KM |
54 | * @ac : charging parameters for AC type charger |
55 | * @usb : charging parameters for USB type charger | |
60fd57e0 | 56 | * @debounce_msec : interrupt debounce time |
9b11adc7 | 57 | */ |
620b2736 | 58 | struct lp8727_platform_data { |
e57b432d MWK |
59 | u8 (*get_batt_present)(void); |
60 | u16 (*get_batt_level)(void); | |
61 | u8 (*get_batt_capacity)(void); | |
62 | u8 (*get_batt_temp)(void); | |
318cb389 KM |
63 | struct lp8727_chg_param *ac; |
64 | struct lp8727_chg_param *usb; | |
60fd57e0 | 65 | unsigned int debounce_msec; |
620b2736 KM |
66 | }; |
67 | ||
68 | #endif |