mb/google/bluey: Check for battery presence in off-mode charging
Verify that a battery is actually present before setting the boot mode to LB_BOOT_MODE_OFFMODE_CHARGING. This prevents the system from incorrectly entering a charging state when running on AC power without a battery connected. TEST=Build and boot on bluey with and without battery present. Verify boot mode transitions correctly. Change-Id: I67098bc06b34c25429daf516f3891c50930209fe Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91290 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
4e6c9f5954
commit
968c60c0d9
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ static enum boot_mode_t set_boot_mode(void)
|
|||
|
||||
enum boot_mode_t boot_mode_new;
|
||||
|
||||
if (is_off_mode()) {
|
||||
if (is_off_mode() && google_chromeec_is_battery_present()) {
|
||||
boot_mode_new = LB_BOOT_MODE_OFFMODE_CHARGING;
|
||||
} else if (google_chromeec_is_below_critical_threshold()) {
|
||||
if (google_chromeec_is_charger_present())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue