tizen 2.4 release
[kernel/u-boot-tm1.git] / include / sprd_battery.h
1 /*
2  * Copyright (C) 2012 Spreadtrum Communications Inc.
3  *
4  * This software is licensed under the terms of the GNU General Public
5  * License version 2, as published by the Free Software Foundation, and
6  * may be copied, distributed, and modified under those terms.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  */
13
14 #ifndef _SPRD_BATTERY_H_
15 #define _SPRD_BATTERY_H_
16 enum sprd_adapter_type {
17         ADP_TYPE_UNKNOW = 0,    //unknow adapter type
18         ADP_TYPE_CDP = 1,       //Charging Downstream Port,USB&standard charger
19         ADP_TYPE_DCP = 2,       //Dedicated Charging Port, standard charger
20         ADP_TYPE_SDP = 4,       //Standard Downstream Port,USB and nonstandard charge
21 };
22
23 void sprdchg_start_charge(void);
24 void sprdchg_stop_charge(void);
25 void sprdchg_set_chg_cur(uint32_t chg_current);
26 void sprdchg_lowbat_charge(void);
27 int sprdchg_charger_is_adapter(void);
28 uint16_t sprdbat_auxadc2vbatvol(uint16_t adcvalue);
29 uint32_t sprdbat_get_vbatauxadc_caltype(void);
30 void sprdbat_lateinit(void);
31 void sprdbat_get_vbatauxadc_caldata(void);
32 void sprdbat_init(void);
33 int sprdbat_is_battery_connected(void);
34 void sprdfgu_init(void);
35
36 #endif
37