summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce <Bruce.Wan@quantatw.com>2017-03-08 20:41:21 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-03-09 22:18:47 -0800
commit876157085e0ce53de870f23993a6badc5683f16d (patch)
treefc47671ea8f0e32a5ce5fc6d4cf7a42a93a64e4d
parent4c8445626a6c5e18bfef7effd61eb74813522e06 (diff)
downloadchrome-ec-876157085e0ce53de870f23993a6badc5683f16d.tar.gz
snappy: Add state for discharge + full
Follow reef setting. When battery is fully charged, light white. BUG=none BRANCH=reef TEST=Fully charge. Plug in charger. LED lights white. Change-Id: I1096fe616ab5ec5954eea142e28fad08f16731ed Signed-off-by: Bruce.Wan <Bruce.Wan@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/451228 Commit-Ready: Bruce Wan <Bruce.Wan@quantatw.com> Tested-by: Bruce Wan <Bruce.Wan@quantatw.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--board/snappy/board.h1
-rw-r--r--board/snappy/led.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/board/snappy/board.h b/board/snappy/board.h
index 81ca45afc2..c3ae6a9e86 100644
--- a/board/snappy/board.h
+++ b/board/snappy/board.h
@@ -148,6 +148,7 @@
#define CONFIG_WIRELESS_SUSPEND EC_WIRELESS_SWITCH_WLAN_POWER
#define CONFIG_WLAN_POWER_ACTIVE_LOW
#define WIRELESS_GPIO_WLAN_POWER GPIO_WIRELESS_GPIO_WLAN_POWER
+#define CONFIG_PWR_STATE_DISCHARGE_FULL
/*
*During shutdown sequence TPS65094x PMIC turns off the sensor rails
diff --git a/board/snappy/led.c b/board/snappy/led.c
index 1850317114..ad7ae2f5e1 100644
--- a/board/snappy/led.c
+++ b/board/snappy/led.c
@@ -123,6 +123,12 @@ static void led_set_battery(void)
case PWR_STATE_CHARGE:
led_set_color_battery(LED_AMBER);
break;
+ case PWR_STATE_DISCHARGE_FULL:
+ if (extpower_is_present()) {
+ led_set_color_battery(LED_WHITE);
+ break;
+ }
+ /* Intentional fall-through */
case PWR_STATE_DISCHARGE:
/*
* Blink white light (1 sec on, 1 sec off)