coreboot/payloads/libpayload/include
Subrata Banik 772270c2c1 mb/google/bluey: Differentiate low battery boot modes
Currently, the system does not explicitly distinguish between a low
battery boot with a charger and one without. This is critical for
deciding whether to allow the boot to proceed or to protect the
battery.

This patch:
1.  Re-introduces LB_BOOT_MODE_LOW_BATTERY to represent a critical
    battery state without a charger present.
2.  Refactors set_boot_mode() to accommodate off-mode charging and
    evaluating battery health (low-batter w/ or w/o charger present)..

TEST=Verified on Bluey:
- Boot with charger + low battery enters LOW_BATTERY_CHARGING.
- Boot without charger + low battery enters LOW_BATTERY..
- Boot with normal battery enters NORMAL mode.

Change-Id: I2c9fa7eb61d1bbd6f9379c81577aee53ab6a0761
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90849
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-01-30 08:31:46 +00:00
..
arm/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
arm64/arch libpayload: arm64: Fix asynchronous exception routing in payload 2025-11-25 16:49:56 +00:00
arpa
mock/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
pci
riscv/arch payloads/libpayload: Add support for RISC-V 64-bit architecture 2026-01-07 00:31:24 +00:00
storage
sys
udc
usb treewide: Use __printf macro instead of "__attribute__(format(printf" 2026-01-29 14:30:31 +00:00
x86/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
archive.h
assert.h
boot_device.h
cbfs.h libpayload: Remove legacy CBFS API 2024-02-22 21:18:39 +00:00
cbfs_glue.h
cbgfx.h
coreboot_tables.h mb/google/bluey: Differentiate low battery boot modes 2026-01-30 08:31:46 +00:00
ctype.h
delay.h libpayload: Use Kconfig instead of weak symbol for arch_ndelay() 2025-05-22 19:27:30 +00:00
die.h treewide: Move stdlib.h to commonlib 2024-03-15 10:09:43 +00:00
endian.h Remove <swab.h> and swabXX() functions 2025-12-12 07:09:45 +00:00
errno.h
exception.h
fmap.h
fpmath.h
gdb.h
getopt.h
inttypes.h
kconfig.h
keycodes.h
libpayload.h libpayload: Pass panel power-off commands to payloads 2026-01-17 02:16:28 +00:00
limits.h Revert "libpayload: Define UCHAR_MAX/CHAR_MIN/CHAR_MAX" 2025-10-14 09:58:49 +00:00
lp_vboot.h libpayload: Add vboot and reboot utility functions 2023-09-18 15:42:31 +00:00
lz4.h payloads/libpayload: Support legacy LZ4 compression format 2025-11-13 23:45:02 +00:00
lzma.h
malloc.h
multiboot_tables.h
panel.h
pci.h
queue.h
stdarg.h
stdbool.h
stddef.h libpayload: Outsource delay function into own header 2023-08-24 13:35:02 +00:00
stdint.h libpayload: Add missing SIZE_MAX define 2024-08-19 23:20:00 +00:00
stdio.h treewide: Use __printf macro instead of "__attribute__(format(printf" 2026-01-29 14:30:31 +00:00
stdlib.h treewide: Move stdlib.h to commonlib 2024-03-15 10:09:43 +00:00
string.h libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
strings.h
sysinfo.h libpayload: Pass panel power-off commands to payloads 2026-01-17 02:16:28 +00:00
term.h
time.h
unistd.h
video_console.h
wchar.h