Merge commit 'refs/merge-requests/1' of gitorious.org:~tytung/linux-on-wince-htc/tytungs-hastarins-linux_on_wince_htc

This commit is contained in:
tytung 2011-03-12 16:13:12 +08:00
commit f8d85d37a8
2 changed files with 15 additions and 8 deletions

View File

@ -719,14 +719,21 @@ static BOOL __battery_param_udpate(struct battery_type *battery)
batt_id_stable_counter = 0;
}
}
temp_01c = get_temp_01c(battery);
if (batt_id_index == 5)
{
battery->temp_adc = battery->temp_adc * 7;
//battery->temp_adc = battery->temp_adc * 7;
temp_01c = 650 - battery->temp_adc*10;
}
/* calculate temperature*/
// battery->temp_01c = get_temp_c((float)temp_R_kohm / ((float)temp_adc_resl/battery->temp_adc - 1))*10;
temp_01c = get_temp_01c(battery);
if(temp_01c == 700)
{
FL_25[battery->id_index] = 2300;
battery->charge_full_real_mAh = FL_25[battery->id_index];
battery->charge_full_design_mAh = battery->charge_full_real_mAh;
temp_01c = 650 - battery->temp_adc*10;
}
if (temp_01c >= TEMP_MIN*10)
battery->temp_01c = temp_01c;
else

View File

@ -46,8 +46,8 @@ UINT32 ID_RANGE[] =
7150, 15500, /* Sony 1300mAh (Formosa) */ /* 7.1k~15k */
27500, 49500, /* Sony 1300mAh (HTE) */ /* 28k~49.5k */
15500, 27500, /* Sanyo 1300mAh (HTE) */ /* 16k~27k */
100, 7150, /* Samsung 1230mAh */ /* 1k~7k */
0, 100, /* HTC Extended 2300mAh */ /* 0k~1k */
100, 7150, /* Samsung 1230mAh */ /* 0.1k~7k */
0, 100, /* HTC Extended 2300mAh */ /* 0k~0.1k */
};
/*This table is calculated according to temp formula for temp mapping.
@ -102,12 +102,12 @@ UINT32 *TEMP_MAP = TEMP_MAP_300K;
UINT32 FL_25[] =
{
1280, /* Unknown battery */
2300, /* Unknown battery */
1280, /* Sony 1300mAh (Formosa) */
1280, /* Sony 1300mAh (HTE) */
1250, /* Sanyo 1300mAh (HTE) */
1230, /* Samsung 1230mAh */
2350, /* HTC Extended 2300mAh */
2300, /* HTC Extended 2300mAh */
};
UINT32 PD_M_COEF[] =
@ -159,7 +159,7 @@ UINT32 M_PARAMETER_Samsung_1230MAH_FORMOSA[] =
UINT32 M_PARAMETER_HTC_2300MAH_FORMOSA[] =
{
/* capacity (in 0.01%) -> voltage (in mV)*/
10000, 4196, 7500, 4165, 4700, 3986, 1700, 3879, 900, 3833, 300, 3740, 0, 3420,
10000, 4135, 7500, 3960, 4700, 3800, 1700, 3727, 900, 3674, 300, 3640, 0, 3420,
};