From 0599f3e1bd793caf053935a59cc9e5404c73ff5c Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 2 Dec 2025 13:19:53 +0000 Subject: [PATCH] mb/google/bluey: Condition slow charging enablement on charger presence Update the logic to properly condition the slow battery charging feature. Previously, enable_slow_battery_charging() was called solely if the system was in a low-power boot state (is_low_power_boot()). This commit adds an explicit check for `google_chromeec_is_charger_present()` to ensure that the slow charging feature is only enabled when a charger is physically connected. TEST=Able to build and boot google/quenbi. Change-Id: I24b6626343a25a4fab3f5d77c1d114e797781be7 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/90335 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/mainboard/google/bluey/mainboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/bluey/mainboard.c b/src/mainboard/google/bluey/mainboard.c index 07b50352c6..660a99f07a 100644 --- a/src/mainboard/google/bluey/mainboard.c +++ b/src/mainboard/google/bluey/mainboard.c @@ -59,8 +59,8 @@ void lb_add_boot_mode(struct lb_header *header) mode->size = sizeof(*mode); mode->boot_mode = get_boot_mode(); - /* Enable charging only during off-mode or low-battery mode */ - if (is_low_power_boot()) + /* Enable charging only during off-mode or low-battery mode and charger present */ + if (is_low_power_boot() && google_chromeec_is_charger_present()) enable_slow_battery_charging(); }