mb/google/bluey: Disable charging during normal boot
This commit adds a call to disable_slow_battery_charging() in the lb_add_boot_mode function. The logic ensures that charging is disabled if the system is booting in a normal mode, where neither the LB_BOOT_MODE_LOW_BATTERY nor LB_BOOT_MODE_OFFMODE_CHARGING flags are set. This prevents unintended charging by the AP firmware when the device is not in a low-battery state or booting from off-mode charging to avoid battery unmanaged health related problem. TEST=Able to build and boot google/quenbi. Change-Id: I648dc72a35ad2773f803792248fa87351333828f Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89023 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
e82338b0a2
commit
29ca9c8bfa
1 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ void lb_add_boot_mode(struct lb_header *header)
|
|||
|
||||
if (google_chromeec_is_below_critical_threshold())
|
||||
mode->boot_mode = LB_BOOT_MODE_LOW_BATTERY;
|
||||
|
||||
/* Booting into normal mode hence disable charging */
|
||||
if (mode->boot_mode == LB_BOOT_MODE_NORMAL)
|
||||
disable_slow_battery_charging();
|
||||
}
|
||||
|
||||
bool mainboard_needs_pcie_init(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue