From 7b867eaa708f31d6e03a33a3ef0b14c02a2b1c02 Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Fri, 7 Jan 2022 12:38:56 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3373463 Reviewed-by: Andrey Pronin Reviewed-by: Vadim Sukhomlinov Commit-Queue: Vadim Sukhomlinov --- chip/g/idle.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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"); -- cgit v1.2.1