diff --git a/arch/arm/mach-msm/board-htcleo.c b/arch/arm/mach-msm/board-htcleo.c index f4424801..3db89f33 100644 --- a/arch/arm/mach-msm/board-htcleo.c +++ b/arch/arm/mach-msm/board-htcleo.c @@ -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 = { diff --git a/drivers/power/ds2746_param.c b/drivers/power/ds2746_param.c index db462c66..714bc7ad 100644 --- a/drivers/power/ds2746_param.c +++ b/drivers/power/ds2746_param.c @@ -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"); } diff --git a/include/linux/ds2746_param_config.h b/include/linux/ds2746_param_config.h index ff77356e..eea2b3e2 100644 --- a/include/linux/ds2746_param_config.h +++ b/include/linux/ds2746_param_config.h @@ -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[] =