summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2022-01-07 12:38:56 -0600
committerCommit Bot <commit-bot@chromium.org>2022-01-07 20:49:16 +0000
commit7b867eaa708f31d6e03a33a3ef0b14c02a2b1c02 (patch)
tree5e553f5f55effdf7fae6490365cec8a9e92300d1
parent633c90dff8875c78f7aa51a03d0f3de9e0b0e881 (diff)
downloadchrome-ec-7b867eaa708f31d6e03a33a3ef0b14c02a2b1c02.tar.gz
H1_RED_BOARD: add `idle d` command
Add a deep sleep option to the idle command on red boards, so it's easier to test deep sleep. BUG=none TEST=run `idle d` with a red board image Change-Id: I913b1fbd46c34530dbdf2ee8ef0ca5dc05584efd Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3373463 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--chip/g/idle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/g/idle.c b/chip/g/idle.c
index 2e872848d4..ea4d5d7467 100644
--- a/chip/g/idle.c
+++ b/chip/g/idle.c
@@ -53,6 +53,10 @@ static int command_idle(int argc, char **argv)
idle_action = IDLE_WFI;
} else if (!strncasecmp("s", argv[1], 1)) {
idle_action = IDLE_SLEEP;
+#ifdef H1_RED_BOARD
+ } else if (!strncasecmp("d", argv[1], 1)) {
+ idle_action = IDLE_DEEP_SLEEP;
+#endif
} else {
return EC_ERROR_INVAL;
}
@@ -64,7 +68,11 @@ static int command_idle(int argc, char **argv)
return EC_SUCCESS;
}
DECLARE_SAFE_CONSOLE_COMMAND(idle, command_idle,
+#ifdef H1_RED_BOARD
+ "[w|s|c|d]",
+#else
"[w|s|c]",
+#endif
"Set idle action: wfi, sleep or "
"Clear the deep sleep count");