1 #ifndef _CUST_BATTERY_METER_TABLE_H
2 #define _CUST_BATTERY_METER_TABLE_H
4 #include <mach/mt_typedefs.h>
6 // ============================================================
8 // ============================================================
13 #ifdef CONFIG_MTK_PMIC_MT6397
14 #define RBAT_PULL_UP_R 24000
15 #define RBAT_PULL_DOWN_R 100000000
16 #define RBAT_PULL_UP_VOLT 1200
21 #define RBAT_PULL_UP_R 16900
22 #define RBAT_PULL_DOWN_R 30000
25 #define RBAT_PULL_UP_R 61900
26 #define RBAT_PULL_DOWN_R 100000
28 #if (BAT_NTC_100 == 1)
29 #define RBAT_PULL_UP_R 24000
30 #define RBAT_PULL_DOWN_R 100000000
32 #define RBAT_PULL_UP_VOLT 1800
36 // ============================================================
38 // ============================================================
40 // ============================================================
42 // ============================================================
44 // ============================================================
46 // ============================================================
47 typedef struct _BATTERY_PROFILE_STRUC
51 } BATTERY_PROFILE_STRUC
, *BATTERY_PROFILE_STRUC_P
;
53 typedef struct _R_PROFILE_STRUC
55 kal_int32 resistance
; // Ohm
57 } R_PROFILE_STRUC
, *R_PROFILE_STRUC_P
;
64 } PROFILE_TEMPERATURE
;
66 // ============================================================
68 // ============================================================
70 // ============================================================
72 // ============================================================
74 // ============================================================
75 // <DOD, Battery_Voltage> Table
76 // ============================================================
78 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
100 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
121 #if (BAT_NTC_100 == 1)
122 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
143 BATTERY_PROFILE_STRUC battery_profile_t0
[] =
235 BATTERY_PROFILE_STRUC battery_profile_t1
[] =
327 BATTERY_PROFILE_STRUC battery_profile_t2
[] =
418 BATTERY_PROFILE_STRUC battery_profile_t3
[] =
508 // battery profile for actual temperature. The size should be the same as T1, T2 and T3
509 BATTERY_PROFILE_STRUC battery_profile_temperature
[] =
600 // ============================================================
601 // <Rbat, Battery_Voltage> Table
602 // ============================================================
604 R_PROFILE_STRUC r_profile_t0
[] =
695 R_PROFILE_STRUC r_profile_t1
[] =
786 R_PROFILE_STRUC r_profile_t2
[] =
877 R_PROFILE_STRUC r_profile_t3
[] =
967 // r-table profile for actual temperature. The size should be the same as T1, T2 and T3
968 R_PROFILE_STRUC r_profile_temperature
[] =
1058 // ============================================================
1059 // function prototype
1060 // ============================================================
1061 int fgauge_get_saddles(void);
1062 BATTERY_PROFILE_STRUC_P
fgauge_get_profile(kal_uint32 temperature
);
1064 int fgauge_get_saddles_r_table(void);
1065 R_PROFILE_STRUC_P
fgauge_get_profile_r_table(kal_uint32 temperature
);
1067 #endif //#ifndef _CUST_BATTERY_METER_TABLE_H