高温高压后如何恢复充电?
0赞在充电的过程中,如果出现高温或者高压的情况下,系统会停止充电,当温度或者充电器的电压值恢复正常后,如何恢复充电?
1.高温后温度正常,恢复充电
mediatek\kernel\drivers\power\battery_common.c
#define RECOVERY_CHARGING_TEMPERATURE xx
mt_battery_checkBatteryTemp()
增加变量static KAL_BOOL g_overTemp = KAL_FALSE;
在
if(BMT_status.temperature >= MAX_CHARGE_TEMERATURE)
{
battery_xlog_printk(BAT_LOG_CRTI, "[BATTERY] Battery Over Temperature !! \n\r");
status = PMU_STATUS_FAIL;
g_overTemp = KAL_TRUE; //add here
}
复制代码
然后在return status之前增加
if((g_overTemp == KAL_TRUE) && (BMT_status.temperature <= RECOVERY_CHARGING_TEMPERATURE))
{
battery_xlog_printk(BAT_LOG_CRTI, "[BATTERY] recovery charging after over temperature!! \n\r");
g_overTemp = KAL_FALSE;
status = PMU_STATUS_OK;
BMT_status.bat_charging_state = CHR_PRE;
}
复制代码
2.高压后充电器电压恢复正常后恢复充电
mediatek\kernel\drivers\power\battery_common.c
#define RECOVERY_CHARGING_VOLTAGE xx
mt_battery_checkChargerVoltage()
if(BMT_status.charger_exist == KAL_TRUE)
{
...
//最后添加下面一段code
if((BMT_status.charger_protect_status == charger_OVER_VOL) && (BMT_status.charger_vol <=
RECOVERY_CHARGING_VOLTAGE))
{
battery_xlog_printk(BAT_LOG_CRTI, "[BATTERY] recovery charging afer over voltage !! \r\n");
BMT_status.charger_protect_status = 0;
BMT_status.bat_charging_state = CHR_PRE;
status = PMU_STATUS_OK;
}
}
复制代码
转自一牛网论坛 原文链接:http://bbs.16rd.com/thread-270708-1-1.html