From 19b6e5da2391bb7f75cf3aa29dddddfad75ff7c8 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Tue, 3 Feb 2015 15:49:47 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/245922 Reviewed-by: Bill Richardson --- common/lightbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/lightbar.c') diff --git a/common/lightbar.c b/common/lightbar.c index 6a72e4458f..662c75a787 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -984,7 +984,7 @@ static int get_tap_direction(void) dir = force_dir; #ifdef HAS_TASK_PDCMD else - pd_exchange_status(&dir); + dir = pd_get_active_charge_port(); #endif if (dir < 0) dir = last_dir; -- cgit v1.2.1