mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 13:14:51 +00:00
The AC status GPIO also indicates power button. When power button is pressed, EC should return VACG in pmu_get_ac() funtion. If this function is called in interrupt context with power button pressed, return 1. Charging task will play nicely in charging mode without real AC. But in discharging mode, it will shutdown application processor if battery remaining capacity is too low. Signed-off-by: Rong Chang <rongchang@chromium.org> BRANCH=snow BUG=chrome-os-partner:12738 TEST=manual With AC plugged, press and hold power button. Run uart console command "pmu" and check output, "ac gpio" should be 1. Change-Id: I26d1a5a7a4ed2ff26a35e965a3ca2307a9c231e9 Reviewed-on: https://gerrit.chromium.org/gerrit/31112 Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Ready: Rong Chang <rongchang@chromium.org> Tested-by: Rong Chang <rongchang@chromium.org>