summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Caruso <ejcaruso@chromium.org>2015-08-12 10:19:06 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-12 20:40:34 +0000
commitf4ba3b2fa32a4dd34570c2bc9b5a592727997eae (patch)
tree4f83ccf34647b0467a00e6b8bbdae4447a85e6aa
parent8ef87c157a9c33f904c7de61245a887fee4d4bba (diff)
downloadchrome-ec-f4ba3b2fa32a4dd34570c2bc9b5a592727997eae.tar.gz
Trigger lightbar pattern from charger task if necessary
If we have a lightbar, but no PD, then plugging the device in will not trigger the battery-level pattern. This allows us to trigger it from the charger task instead if we change AC status and don't have a PD. BRANCH=ToT BUG=None TEST=plug and unplug charger from device, make sure the lightbar plays the right pattern Change-Id: I8f37aaff2ddb9d936e13489cb404caee822418a1 Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/292943 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--common/charge_state_v2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index 0ca0974739..7b7687db44 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -16,6 +16,7 @@
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
+#include "lightbar.h"
#include "math_util.h"
#include "printf.h"
#include "sb_fw_update.h"
@@ -608,6 +609,9 @@ void charger_task(void)
battery_seems_to_be_dead = 0;
prev_ac = curr.ac;
}
+#if defined(HAS_TASK_LIGHTBAR) && !defined(HAS_TASK_PDCMD)
+ lightbar_sequence(LIGHTBAR_TAP);
+#endif
}
charger_get_params(&curr.chg);
battery_get_params(&curr.batt);