mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 09:01:35 +00:00
samus: display battery status on lightbar on AC change
Display battery percentage on the lightbar whenever AC status changes. BUG=chrome-os-partner:32894 BRANCH=samus TEST=Plug and unplug AC in S0 and in G3 and make sure that lightbar displays battery percentage each time Change-Id: I281c9242d185da06b0c778de12e4f6340779a840 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223362 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
fca5deab2f
commit
c1e908fcac
@@ -26,6 +26,7 @@
|
||||
#include "jtag.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lightbar.h"
|
||||
#include "motion_sense.h"
|
||||
#include "peci.h"
|
||||
#include "power.h"
|
||||
@@ -235,6 +236,15 @@ enum battery_present battery_is_present(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Show battery status on lightbar when AC status changes
|
||||
*/
|
||||
void show_battery_status(void)
|
||||
{
|
||||
lightbar_sequence(LIGHTBAR_TAP);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_AC_CHANGE, show_battery_status, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/**
|
||||
* Discharge battery when on AC power for factory test.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user