FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/power/board/power.c @ 263:b5e8dfd114a7
Switch_ON(): go into charging boot mode on either CHGSTS or CHGPRES
If someone were to plug and then unplug a charger into a switched-off
phone in an extremely brief "glitch" manner, we should do an automatic
power-off on boot in this condition. When we were checking only
CHGPRES in Switch_ON(), we would go into Misc boot state instead,
which is undesirable. Now if we have a CHGSTS but not CHGPRES
condition, we will go into charging boot mode, and FCBM will then
do the automatic power-off upon detecting absence of the charger
in its periodic polling.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Fri, 14 May 2021 05:50:36 +0000 |
| parents | a5b00817a60f |
| children | a75eefbf8be4 |
comparison
equal
deleted
inserted
replaced
| 262:7420959e02ec | 263:b5e8dfd114a7 |
|---|---|
| 116 ** Warning The Set_Switch_ON_Cause() function has to be called prior. | 116 ** Warning The Set_Switch_ON_Cause() function has to be called prior. |
| 117 ** | 117 ** |
| 118 *******************************************************************************/ | 118 *******************************************************************************/ |
| 119 void Switch_ON(void) | 119 void Switch_ON(void) |
| 120 { | 120 { |
| 121 if (Power_abb_status & CHGPRES) | 121 if (Power_abb_status & (CHGSTS|CHGPRES)) |
| 122 { | 122 { |
| 123 /* Switch on Condition on CHARGER IC PLUG */ | 123 /* Switch on Condition on CHARGER IC PLUG */ |
| 124 rvf_send_trace("Boot: Charger Plug",18, NULL_PARAM, | 124 rvf_send_trace("Boot: Charger Plug",18, NULL_PARAM, |
| 125 RV_TRACE_LEVEL_DEBUG_LOW, LCC_USE_ID); | 125 RV_TRACE_LEVEL_DEBUG_LOW, LCC_USE_ID); |
| 126 #if (MMI != 0) | 126 #if (MMI != 0) |
