coreboot/src/ec
Subrata Banik fa5e3d9d44 ec/google/chromeec: Optimize battery string readout with caching
This commit refactors the long battery string implementation to include
caching of the EC response for battery information (model, serial, and
manufacturer).

This optimization reduces resume time by approximately 63ms by
minimizing communication overhead between the AP and EC.

BUG=b:366338622
TEST=Verified on google/tivviks_ufs:
    * Long battery string is displayed when
      EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING is enabled.
    * Short battery string is displayed when
      EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING=n.

Change-Id: I32ae5b5e618f20335f3d344811a97f1416df529e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2024-09-14 18:13:47 +00:00
..
51nb/npce985la0dx include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
acpi ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
apple/acpi tree: Replace ShiftLeft(a,b) with ASL 2.0 syntax 2022-12-23 08:30:39 +00:00
clevo/it5570e tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
compal/ene932 ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
dasharo/ec ec/dasharo/ec: Add initial copy of ec/system76/ec 2024-06-03 16:45:20 +00:00
dell/mec5035 ec/dell/mec5035: Replace defines with enums 2024-08-26 22:32:30 +00:00
google ec/google/chromeec: Optimize battery string readout with caching 2024-09-14 18:13:47 +00:00
hp/kbc1126 ec/hp/kbc1126/acpi: Drop unnecessary _STA methods 2024-03-16 15:20:04 +00:00
intel ec: Rename Makefiles from .inc to .mk 2024-01-24 08:35:25 +00:00
kontron ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
lenovo tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
purism tree: Remove unused <stddef.h> 2024-05-29 02:51:20 +00:00
quanta ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
roda/it8518 include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
smsc/mec1308 ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
starlabs/merlin ec/starlabs/merlin: Don't report the battery serial number to ACPI 2024-09-10 13:41:31 +00:00
system76/ec ec/system76/ec: Remove RPM calculation 2024-07-26 23:03:33 +00:00
ec.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00