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 27000
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
{
50 } BATTERY_PROFILE_STRUC
, *BATTERY_PROFILE_STRUC_P
;
52 typedef struct _R_PROFILE_STRUC
{
53 kal_int32 resistance
; // Ohm
55 } R_PROFILE_STRUC
, *R_PROFILE_STRUC_P
;
61 } PROFILE_TEMPERATURE
;
63 // ============================================================
65 // ============================================================
67 // ============================================================
69 // ============================================================
71 // ============================================================
72 // <DOD, Battery_Voltage> Table
73 // ============================================================
75 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
97 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
118 #if (BAT_NTC_100 == 1)
119 BATT_TEMPERATURE Batt_Temperature_Table
[] = {
140 BATTERY_PROFILE_STRUC battery_profile_t0
[] = {
230 BATTERY_PROFILE_STRUC battery_profile_t1
[] = {
320 BATTERY_PROFILE_STRUC battery_profile_t2
[] = {
410 BATTERY_PROFILE_STRUC battery_profile_t3
[] = {
499 // battery profile for actual temperature. The size should be the same as T1, T2 and T3
500 BATTERY_PROFILE_STRUC battery_profile_temperature
[] = {
590 // ============================================================
591 // <Rbat, Battery_Voltage> Table
592 // ============================================================
594 R_PROFILE_STRUC r_profile_t0
[] = {
684 R_PROFILE_STRUC r_profile_t1
[] = {
774 R_PROFILE_STRUC r_profile_t2
[] = {
864 R_PROFILE_STRUC r_profile_t3
[] = {
953 // r-table profile for actual temperature. The size should be the same as T1, T2 and T3
954 R_PROFILE_STRUC r_profile_temperature
[] = {
1043 // ============================================================
1044 // function prototype
1045 // ============================================================
1046 int fgauge_get_saddles(void);
1047 BATTERY_PROFILE_STRUC_P
fgauge_get_profile(kal_uint32 temperature
);
1049 int fgauge_get_saddles_r_table(void);
1050 R_PROFILE_STRUC_P
fgauge_get_profile_r_table(kal_uint32 temperature
);
1052 #endif //#ifndef _CUST_BATTERY_METER_TABLE_H