diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-10-29 14:10:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-08 00:48:02 -0800 |
commit | 776eadc1b4b1a92688c441cbebfacf1eea6471fc (patch) | |
tree | 03516231f93f3363adfee360023f84d9062b889a /include/battery.h | |
parent | 0275d7360271f2fad2740f0c56cf0c83bf3a24d8 (diff) | |
download | chrome-ec-776eadc1b4b1a92688c441cbebfacf1eea6471fc.tar.gz |
Battery: Get display charge percentage
This patch converts the actual battery charge to the display
percentage using the same conversion used by Powerd. EC can use this
number to control LEDs synchronously to the value 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: I2041cb768dee27b8dba94a32db0eb62dfa14c73b
Reviewed-on: https://chromium-review.googlesource.com/1309033
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/battery.h')
-rw-r--r-- | include/battery.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/battery.h b/include/battery.h index 38d7dd32aa..e3eec84164 100644 --- a/include/battery.h +++ b/include/battery.h @@ -85,6 +85,7 @@ struct batt_params { int desired_current; /* Charging current desired by battery (mA) */ int remaining_capacity; /* Remaining capacity in mAh */ int full_capacity; /* Capacity in mAh (might change occasionally) */ + int display_charge; /* Display charge in 10ths of a % (1000=100.0%) */ int status; /* Battery status */ enum battery_present is_present; /* Is the battery physically present */ int flags; /* Flags */ |