diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-10-29 14:12:07 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-08 00:48:02 -0800 |
commit | ba92cadcf87075d80e065bfe606286d1885817b1 (patch) | |
tree | bfea75008b8a90bfe20376e28766baba8085c4dc /include | |
parent | 776eadc1b4b1a92688c441cbebfacf1eea6471fc (diff) | |
download | chrome-ec-ba92cadcf87075d80e065bfe606286d1885817b1.tar.gz |
chgstv2: Notify on display percentage change
This patch makes the charger task v2 notify HOOK_BATTERY_SOC_CHANGE
handlers when the display charge percentage changes. This allows EC
to update LEDs synchronously to the number on the display.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:109954565,b:80270446
BRANCH=none
TEST=Verify charge LED changes to white (full) on Sona synchronously
to the display percentage.
TEST=Verify charge LED changes to blinking white (low) on Sona
within 30 seconds synchronously to the display percentage.
Change-Id: Ib2c587ad3307fe62b268a25a93344c88c6c137f3
Reviewed-on: https://chromium-review.googlesource.com/1309034
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/charge_state.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h index bcf9071d6b..e19a2a9ab1 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -92,6 +92,11 @@ uint32_t charge_get_flags(void); int charge_get_percent(void); /** + * Return current display charge in 10ths of a percent (e.g. 1000 = 100.0%) + */ +int charge_get_display_charge(void); + +/** * Check if board is consuming full input current * * This returns true if the battery charge percentage is between 2% and 95% |