Attention is currently required from: Boris Mittelberg, Caveh Jalali.
Hello Boris Mittelberg, Caveh Jalali,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85759?usp=email
to look at the new patch set (#2).
Change subject: ec/google/chromeec: Add API to check if battery is critically low ......................................................................
ec/google/chromeec: Add API to check if battery is critically low
This patch adds a new API `google_chromeec_is_below_critical_threshold() ` to check if the battery level is below the critical threshold.
The API uses the existing `ec_cmd_battery_get_dynamic()` command to retrieve the battery flags and checks the `EC_BATT_FLAG_LEVEL_CRITICAL` flag to determine if the battery level is critical.
This API can be used by other components to query the battery critical status and take necessary actions, for example, while the system is booting with low battery fuel with and/or without an AC charger attached.
This addresses the need to implement a low battery charger icon and detect when the system is booting with low battery fuel. The existing `google_chromeec_is_battery_present_and_above_critical_threshold()` API is not suitable for this purpose because any negative decision (like battery not present and/or battery is critically low) implemented around this existing API will also render the lower battery indicator when the system is booting into battery cut-off mode. Ideally, we do not wish to render any icon and simply allow boot to the OS during system battery cut-off boot.
BUG=b:377798581 TEST=Able to read the battery status correctly while booting google/fatcat.
Change-Id: Id1fc1df374fb4c663becc371c69b285d8b9957ff Signed-off-by: Subrata Banik subratabanik@google.com --- M src/ec/google/chromeec/ec.c M src/ec/google/chromeec/ec.h 2 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/85759/2