diff --git a/drivers/power/ds2746_param.c b/drivers/power/ds2746_param.c index b881e113..d8470bf1 100644 --- a/drivers/power/ds2746_param.c +++ b/drivers/power/ds2746_param.c @@ -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 diff --git a/include/linux/ds2746_param_config.h b/include/linux/ds2746_param_config.h index 9779340f..728f0d4d 100644 --- a/include/linux/ds2746_param_config.h +++ b/include/linux/ds2746_param_config.h @@ -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, };