summaryrefslogtreecommitdiff
path: root/board/poppy
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-03-13 16:04:53 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-28 23:23:32 -0700
commitb3ecc19cb3029b7fd15d846fd287f09276f25838 (patch)
treeb60e13c0884b2b81a6db1c6745aac0a3e3064d4b /board/poppy
parent8fb18f174ce9aac91c5fc41ebe4b12c0aa746ba0 (diff)
downloadchrome-ec-b3ecc19cb3029b7fd15d846fd287f09276f25838.tar.gz
charge_state_v2: Hibernate base in S5 with no AC
Tell the base to hibernate when we are in S5, and no AC is connected. Also, wake the base when AC status changes (S5), and when the system transistions out of S5. BRANCH=none BUG=b:71874971 TEST=1. Lid EC console: apshutdown => Check that Base EC hibernates 2.a. Lid EC console: powerb; => Check that base reconnects 2.b. Connect/disconnect adapter: check that base disconnects and reconnects Change-Id: I5e9a4afc64a07ad92f37d171a78a914d26f07c8e Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/958814 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/poppy')
-rw-r--r--board/poppy/base_detect_lux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/poppy/base_detect_lux.c b/board/poppy/base_detect_lux.c
index 48c4aa8929..a46fe2eac8 100644
--- a/board/poppy/base_detect_lux.c
+++ b/board/poppy/base_detect_lux.c
@@ -11,6 +11,7 @@
#include "chipset.h"
#include "common.h"
#include "console.h"
+#include "extpower.h"
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
@@ -196,6 +197,13 @@ void base_detect_interrupt(enum gpio_signal signal)
base_detect_debounce_time = time_now + BASE_DETECT_DEBOUNCE_US;
}
+void board_base_reset(void)
+{
+ CPRINTS("Resetting base.");
+ base_detect_change(BASE_UNKNOWN);
+ hook_call_deferred(&base_detect_deferred_data, BASE_DETECT_RETRY_US);
+}
+
static void base_init(void)
{
/*