mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
a4b536c0f3fef40a1e764477dc2edfb233321c55
Just checking for battery present gpio is not sufficient to determine the state of the battery. On the lines of the changes made by Eve, add a new battery_is_present function which: 1. Checks hardware gpio signal to determine if battery is present 2. If yes, then checks following if its status just changed to present: a. Battery is not in cut-off state b. Battery is not in disconnect state (charging and discharging disabled) c. Battery initialization is complete Only if all the above conditions are true, then battery is considered as present. BUG=b:64460667,b:64370648 BRANCH=None TEST=Verified that with this change recovering system from battery cut-off is more consistent. Change-Id: I10abdf603e01f404c9b8e2094e36bc068adf5450 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/607035 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit For instructions on building from source, refer to http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%