vc/google/chromeos: Add platform hook for emergency battery shutdown
Introduce platform_handle_emergency_low_battery() to handle the
pre-shutdown sequence when battery levels are critical.
This hook ensures:
1. Visual feedback is provided (Lightbar set to red).
2. The event is logged to ELOG for post-mortem analysis.
3. A delay is enforced to ensure logs are committed and the user
notices the alert before the AP powers off.
BUG=none
BRANCH=none
TEST=Verified lightbar turns red and ELOG is recorded on low battery
boot.
Change-Id: I3f1b2757002d7a2a76dfb51d24a04e2d81b061bb
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
086d3a3232
commit
5c44e689ee
2 changed files with 31 additions and 0 deletions
|
|
@ -191,8 +191,15 @@ void bmp_release_logo(void);
|
|||
*/
|
||||
#if CONFIG(PLATFORM_HAS_LOW_BATTERY_INDICATOR)
|
||||
bool platform_is_low_battery_shutdown_needed(void);
|
||||
/*
|
||||
* Platform hooks for system shutdown due to critical battery levels.
|
||||
* Provides visual feedback via the Lightbar/LEDs and logs the event
|
||||
* to non-volatile storage before signaling to cut power.
|
||||
*/
|
||||
void platform_handle_emergency_low_battery(void);
|
||||
#else
|
||||
static inline bool platform_is_low_battery_shutdown_needed(void) { return false; }
|
||||
static inline void platform_handle_emergency_low_battery(void) { /* nop */ }
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue