cLK: off_mode_charging just prevents the kernel from BUG() if off mode charging and panel is off ( and not detectable )

By cedesmith. http://forum.xda-developers.com/showpost.php?p=10837322&postcount=2
This commit is contained in:
tytung 2011-03-08 00:12:31 +08:00
parent d1446674eb
commit 27f7fd8972
2 changed files with 14 additions and 2 deletions

View File

@ -861,9 +861,17 @@ static void detect_panel_type(void)
}
else
{
printk(" UNKNOWN, stop system now\n");
htcleo_panel_type = PANELTYPE_UNKNOWN;
BUG();
extern int board_mfg_mode(void);
if(board_mfg_mode()==5)
{
printk(" offmode charging, panel is off\n");
}
else
{
printk(" UNKNOWN, stop system now\n");
BUG();
}
}
}

View File

@ -457,6 +457,10 @@ int __init board_mfg_mode_init(char *s)
mfg_mode = 2;
else if (!strcmp(s, "charge"))
mfg_mode = 3;
else if (!strcmp(s, "power_test"))
mfg_mode = 4;
else if (!strcmp(s, "offmode_charging"))
mfg_mode = 5;
return 1;
}