diff options
author | RaviChandra Sadineni <ravisadineni@google.com> | 2018-08-22 17:28:17 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-13 18:58:41 -0700 |
commit | 10b223dd62ca5178290a201a353e21bcd040b24d (patch) | |
tree | 39395acfc36316226aefddba15a5322f8008a736 /board/poppy/board.c | |
parent | 26767c965ee02fe47d86a96a28117a4a61bf90b2 (diff) | |
download | chrome-ec-10b223dd62ca5178290a201a353e21bcd040b24d.tar.gz |
base_detect: Expose console command to force state.
In an effort to test wake sources on any given platform, this
CL exposes console command to set the base state. This console
command can then be invoked by autottests from the uart interface.
We have two implementations for managing base status. One is interrupt
driven while the other is a polling via a task.
Boards current implementations then are:
interrupts: lux, soraka, cheza
polling task: nocturne, zoombini
For forcing base connect and disconnect,
interrupts: Disable interrupts and set forced base state.
polling task: Stop periodic task and set forced base state.
On reset,
interrupts: Schedule deferred task immediately and enable interrupts.
polling task: Clear forced base state and begin rescheduling periodic
task.
Signed-off-by: RaviChandra Sadineni <ravisadineni@google.com>
BRANCH=poppy,nocturne
BUG=chromium:820668, b:37223093
TEST=Tested on lux, soraka and nocturne
basestate a : attaches the lid, reflected in ui.
basestate d : detaches the lid, reflected in ui.
basestate r : resets to the correct state.
Wakes the device up on lux and nocturne and soraka.
Change-Id: Iab698e103a50b8d22bf216a6f816998cb158e38a
Reviewed-on: https://chromium-review.googlesource.com/1184172
Commit-Ready: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Tested-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'board/poppy/board.c')
-rw-r--r-- | board/poppy/board.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/board/poppy/board.c b/board/poppy/board.c index 61b990b7a2..20c57d6388 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -142,22 +142,6 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal) } #endif -static int command_attach_base(int argc, char **argv) -{ - tablet_set_mode(0); - return EC_SUCCESS; -} -DECLARE_CONSOLE_COMMAND(attachbase, command_attach_base, - NULL, "Simulate attach base"); - -static int command_detach_base(int argc, char **argv) -{ - tablet_set_mode(1); - return EC_SUCCESS; -} -DECLARE_CONSOLE_COMMAND(detachbase, command_detach_base, - NULL, "Simulate detach base"); - #include "gpio_list.h" /* power signal list. Must match order of enum power_signal. */ |