mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 02:15:14 +00:00
samus: fix lightbar tap sequence doesn't always show on AC event
Fix bug on samus that the battery status doesn't always show on lightbar when AC is plugged/unplugged. It doesn't show when the battery is full is S3 or S5 because in these states we turn off CHARGE_EN so that ACOK to the EC never toggles. Instead, what we want to do is display battery status whenever the active charge port changes. This will happen when AC is plugged or unplugged OR if a user has AC on both ports and toggles between them using the charge override hot-keys. BUG=chrome-os-partner:36317 BRANCH=samus TEST=test plugging and unplugging AC on both sides when battery is full and unit is in S0, and when unit is in S5. also tested lightbar flashes battery percentage when two zingers are plugged in and you switch between them using Ctrl+Search+0|1|2. Change-Id: I5cd7fff4f466adf857f1e63f07f3b0c7ae8422c7 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/245922 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
9590a53920
commit
19b6e5da23
@@ -216,14 +216,11 @@ void host_throttle_cpu(int throttle);
|
||||
void host_command_pd_send_status(enum pd_charge_state new_chg_state);
|
||||
|
||||
/**
|
||||
* Ask the PD MCU for its status, obtaining the current charge_port as a
|
||||
* side-effect (-1 means none or don't know).
|
||||
* Get the active charge port from the PD
|
||||
*
|
||||
* @param charge_port If present, updated with the current charge port:
|
||||
* -1 == none/unknown, 0 == left, 1 == right.
|
||||
* @return -1 == none/unknown, 0 == left, 1 == right.
|
||||
*/
|
||||
void pd_exchange_status(int *charge_port);
|
||||
|
||||
int pd_get_active_charge_port(void);
|
||||
|
||||
/**
|
||||
* Send host command to PD MCU.
|
||||
|
||||
Reference in New Issue
Block a user