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 <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90335 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
8b3ceacd93
commit
0599f3e1bd
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue