coreboot/src
Subrata Banik 8b3ceacd93 ec/google: Check AC charger presence by reading host event register
The google_chromeec_is_charger_present function previously relied on
executing the EC_CMD_BATTERY_DYNAMIC_INFO command to check the
EC_BATT_FLAG_AC_PRESENT flag.

This commit refactors the function to directly read the host event
register (EC events B) and check for the EC_HOST_EVENT_AC_CONNECTED
event flag instead.

This approach is much more efficient as it avoids the overhead of
sending and receiving a full EC command (savings ~25-30ms), using a
readily available cached status instead.

TEST=Able to build and boot google/quenbi.

Change-Id: I2ec9aca5991394ed1d4998da37e074e9324bd672
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90334
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-12-05 14:28:21 +00:00
..
acpi acpigen_ps2_keybd: map insert 2025-11-22 18:55:53 +00:00
arch cpu/intel: Add SMBIOS Socket BGA1744 type 2025-12-02 01:55:26 +00:00
commonlib commonlib: Add CBMEM ID to store boot mode 2025-11-26 18:56:39 +00:00
console console: Fix flushing for slow consoles 2025-10-02 22:44:46 +00:00
cpu soc/intel/common/block/rtc/rtc.c: Top Swap: add Slot B selection mechanism 2025-12-04 01:31:25 +00:00
device device: Introduce reworked azalia verb table 2025-09-28 18:18:14 +00:00
drivers drivers/intel/gma: Unify coding style 2025-12-04 09:11:01 +00:00
ec ec/google: Check AC charger presence by reading host event register 2025-12-05 14:28:21 +00:00
include soc/intel/common/block/rtc/rtc.c: Top Swap: add Slot B selection mechanism 2025-12-04 01:31:25 +00:00
lib soc/intel/common/block/rtc/rtc.c: Top Swap: add Slot B selection mechanism 2025-12-04 01:31:25 +00:00
mainboard mb/google/rauru: Add MIPI panel support with BOE NS130069-M00 2025-12-05 09:04:01 +00:00
northbridge Haswell NRI: Print and fill in memory-related info 2025-10-29 16:52:51 +00:00
sbom sbom: Fix build with merged bootblock and romstage 2025-07-07 14:29:29 +00:00
security {mb, security}: Use EC_REBOOT_FLAG_IMMEDIATE for cold reboots 2025-12-05 06:52:35 +00:00
soc mb/google/rauru: Add MIPI panel support with BOE NS130069-M00 2025-12-05 09:04:01 +00:00
southbridge tree: Use boolean for s3resume 2025-10-23 13:34:15 +00:00
superio sio/nuvoton/common/nuvoton.h: Add common Nuvoton SIO LDNs 2025-10-29 16:56:07 +00:00
vendorcode vendorcode/amd/fsp/.../fsp_h_c99.h: Use fsp2_0 structs 2025-12-02 15:27:39 +00:00
Kconfig Kconfig: Introduce HAVE_CBFS_FILE_OPTION_BACKEND 2025-09-17 04:18:07 +00:00