This commit adds a `do_low_battery_poweroff()` function to handle platform power off due to critically low battery levels. This provides a standardized way to handle low battery shutdowns across platforms. Additionally, the delay to the `do_low_battery_poweroff()` function, allowing time for the low battery indicator to be displayed before powering off. The delay is configurable through the `PLATFORM_LOW_BATTERY_SHUTDOWN_DELAY_SEC` Kconfig option. Finally, a low battery indicator event is logged using `elog` before the delay. This functionality (elog and delay) is enabled when the `PLATFORM_HAS_LOW_BATTERY_INDICATOR` Kconfig option is selected. BUG=b:339673254 TEST=Able to build and boot google/brox. Change-Id: I92e9003c70c2608770972f1a302f954ebdf17bc4 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86361 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> |
||
|---|---|---|
| .. | ||
| acpi | ||
| basecode | ||
| block | ||
| pch | ||
| fsp_reset.c | ||
| hda_verb.c | ||
| hda_verb.h | ||
| Kconfig.common | ||
| Makefile.mk | ||
| mma.c | ||
| mma.h | ||
| nhlt.c | ||
| reset.c | ||
| reset.h | ||
| smbios.c | ||
| smbios.h | ||
| tco.h | ||
| tpm_tis.c | ||
| vbt.c | ||
| vbt.h | ||