htcleo: add new battery temperature table

This table is not absolutly exact, but good
This commit is contained in:
Markinus 2010-10-26 20:40:02 +02:00
parent 55ca1d277a
commit 53a7287c1b
3 changed files with 17 additions and 2 deletions

View File

@ -738,7 +738,7 @@ static struct platform_device htc_battery_pdev = {
static int get_thermal_id(void)
{
return THERMAL_300;
return THERMAL_600;
}
static struct ds2746_platform_data ds2746_pdev_data = {

View File

@ -843,7 +843,10 @@ void battery_param_init(struct battery_type *battery)
if (battery->thermal_id == THERMAL_1000) {
TEMP_MAP = TEMP_MAP_1000K;
printk(DRIVER_ZONE "Use 1000 Kohm thermal resistance");
} else {
} else if (battery->thermal_id == THERMAL_600) {
TEMP_MAP = TEMP_MAP_600K;
printk(DRIVER_ZONE "Use 600 Kohm thermal resistance");
} else {
printk(DRIVER_ZONE "Use default(300 Kohm) thermal resistance");
}

View File

@ -71,6 +71,17 @@ UINT32 TEMP_MAP_300K[] =
1406, 1433, 2047,
};
UINT32 TEMP_MAP_600K[] =
{
0,56,59,60,63,65,68,70,73,75,78,81,84,87,91,94,98,
102,105,110,114,118,123,128,133,138,144,149,156,161,
168,175,181,189,197,205,213,222,231,240,250,260,270,
281,293,304,317,329,343,356,371,385,401,417,433,450,
467,486,504,523,543,563,584,616,628,650,674,697,721,
746,772,798,824,851,878,906,934,962,991,1020,
1050,1079,2047,
};
UINT32 TEMP_MAP_1000K[] =
{
0, 30, 31, 32, 34, 35, 36, 38, 39, 40,
@ -84,6 +95,7 @@ UINT32 TEMP_MAP_1000K[] =
812, 843, 2047,
};
UINT32 *TEMP_MAP = TEMP_MAP_300K;
UINT32 FL_25[] =