# HG changeset patch # User Mychaela Falconia # Date 1620971436 0 # Node ID b5e8dfd114a7c77ed2b481a38854db40de85b1bf # Parent 7420959e02ec136bda446ca0287928d614417397 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. diff -r 7420959e02ec -r b5e8dfd114a7 src/cs/drivers/drv_app/power/board/power.c --- 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,