1. 程式人生 > >mtk8735b 低電(電壓小於3.4V)充不亮充電圖示

mtk8735b 低電(電壓小於3.4V)充不亮充電圖示

mtk 低電(電壓小於3.4V)充不亮充電圖示

檢視log知道亮低電充電圖示是在lk層
MTK啟動流程
`
bootroom(載入pl 可USB下載) ------->pl(載入lk)----------->lk(載入核心)-------->kernel(驅動(GPL認證),核心態init程序啟動)--------->Android系統(Android Framework層初始化,使用者態init程序啟動)

\mt8163_8.1_9_5\alps\vendor\mediatek\proprietary\bootable\bootloader\lk\platform\mt8163 platform.c有下面的程式碼控制低電會亮低電圖示

void platform_init(void)
{
....................
#ifdef MTK_KERNEL_POWER_OFF_CHARGING
	if (kernel_charging_boot() == 1) {
#ifdef MTK_BATLOWV_NO_PANEL_ON_EARLY//由於此專案是充電dc充電的不滿足下面的判斷條件所以不會亮低電圖示
		CHARGER_TYPE CHR_Type_num = CHARGER_UNKNOWN;
		CHR_Type_num = hw_charging_get_charger_type();
		if ((g_boot_mode != LOW_POWER_OFF_CHARGING_BOOT) ||
		        ((CHR_Type_num != STANDARD_HOST) && (CHR_Type_num != NONSTANDARD_CHARGER))) {
#endif
			mt_disp_power(TRUE);
			mt_disp_show_low_battery();//呼叫該函式可以亮低電圖示
			mt65xx_leds_brightness_set(6, 110);
#ifdef MTK_BATLOWV_NO_PANEL_ON_EARLY
		}
#endif
	} else if (g_boot_mode != KERNEL_POWER_OFF_CHARGING_BOOT && g_boot_mode != LOW_POWER_OFF_CHARGING_BOOT) {
		if (g_boot_mode != ALARM_BOOT && (g_boot_mode != FASTBOOT)) {
			mt_disp_show_boot_logo();
		}
	}
...................
}
//改法 \mt8163_8.1_9_5\alps\device\mediateksample\tb8163p3_bsp\elink\PCBA\H863 

ProjectConfig.mk中該巨集關閉
....................
MTK_BATLOWV_NO_PANEL_ON_EARLY = no
...................

\mt8163_8.1_9_5\alps\device\mediateksample\tb8163p3_bsp\elink\PCBA\H863 
tb8163p3_bsp_lk.mk  控制lk層的該巨集關閉
.................
#DEFINES += MTK_BATLOWV_NO_PANEL_ON_EARLY
.................