2 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
3 * Sanghee Kim <sh0130.kim@samsung.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 #ifndef _FUELGUAGE_BATTERY_DATA_H_
24 #define _FUELGUAGE_BATTERY_DATA_H_
26 /* common parameter */
27 #define DSG_DV 65 /* mV */
28 #define CHG_DV 40 /* mV */
29 #define T_DV 100 /* mV, voltage tolerance */
30 #define T_SOC_DSG_UPPER 10 /* 10%, soc tolerance */
31 #define T_SOC_DSG_BELOW 20 /* 20%, soc tolerance */
32 #define T_SOC_CHG_UPPER 10 /* 10%, soc tolerance */
33 #define T_SOC_CHG_BELOW 10 /* 10%, soc tolerance */
34 #define T_SOC_W 27 /* 27%, soc tolerance(reset case) */
35 #define T_SOC_LOW 3 /* 3%, soc tolerance(low batt) */
36 #define T_SOC_HIGH 97 /* 97%, soc tolerance(high batt) */
38 #define PLAT_VOL_HIGH_DSG 380000 /* unit : 0.01mV */
39 #define PLAT_VOL_LOW_DSG 365000 /* unit : 0.01mV */
40 #define PLAT_VOL_HIGH_CHG 385000 /* unit : 0.01mV */
41 #define PLAT_VOL_LOW_CHG 370000 /* unit : 0.01mV */
42 #define PLAT_T_SOC 0 /* 0%, soc tolerance */
43 #define DSG_VCELL_COMP -2000 /* vcell compensation for table soc, unit : 0.01mV */
44 #define CHG_VCELL_COMP -1500 /* vcell compensation for table soc, unit : 0.01mV */
45 #define AVER_SAMPLE_CNT 5
47 #define FUELGAUGE_POWER_CHECK_COUNT 20
48 #define SOC_DIFF_CHECK_COUNT 5
49 #define SOC_DIFF_TH 10
51 /* parameter for SDI 1750mA 2012.02.17 */
52 #define SDI_1750_RCOMP0 0x004F
53 #define SDI_1750_TEMPCO 0x102B
55 /* parameter for SDI 2100mA 2012.01.25 */
56 #define SDI_2100_RCOMP0 0x0065
57 #define SDI_2100_TEMPCO 0x0930
65 struct table_soc_data {