diff 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
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/power/board/power.c	Fri May 14 05:38:55 2021 +0000
+++ b/src/cs/drivers/drv_app/power/board/power.c	Fri May 14 05:50:36 2021 +0000
@@ -118,7 +118,7 @@
 *******************************************************************************/
 void Switch_ON(void)
 {
-   if (Power_abb_status & CHGPRES)
+   if (Power_abb_status & (CHGSTS|CHGPRES))
    {
       /* Switch on Condition on CHARGER IC PLUG */
       rvf_send_trace("Boot: Charger Plug",18, NULL_PARAM,