summaryrefslogtreecommitdiff
path: root/common/keyboard_8042.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-06 11:21:07 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-07 01:26:10 +0000
commitc28fa1ade5eb35534a85ce82060cf955151c6337 (patch)
tree98b97d3cc57b3c083a098ccf1175ce95942147a2 /common/keyboard_8042.c
parent9af5df80b12b7a4d1462507e23d4b3100f6f371b (diff)
downloadchrome-ec-c28fa1ade5eb35534a85ce82060cf955151c6337.tar.gz
zephyr: Enable the '8042' command
This is used to provide information about the keyboard operation. Enable this command and its subcommands. Note that in ECOS these subcommands are also top-level commands, but this is not the case in Zephyr, since it seems unnecessary. Note also that changing these to console sub-commands may end up making FAFT testing more difficult since the invocation on the EC UART would be different. BUG=b:167405015 BRANCH=none TEST=make BOARD=volteer zmake configure .../zephyr-chrome/projects/experimental/volteer \ -B /tmp/z/cos zmake build /tmp/z/cos Run on volteer and try out '8042 kbd', etc. Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ia11092af350247ac98681485a9ddd309c7192272 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523452 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/keyboard_8042.c')
-rw-r--r--common/keyboard_8042.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c
index 12a7da2560..9fbde467a0 100644
--- a/common/keyboard_8042.c
+++ b/common/keyboard_8042.c
@@ -1070,10 +1070,6 @@ static int command_typematic(int argc, char **argv)
ccputs("}\n");
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(typematic, command_typematic,
- "[first] [inter]",
- "Get/set typematic delays");
-
static int command_codeset(int argc, char **argv)
{
@@ -1093,10 +1089,6 @@ static int command_codeset(int argc, char **argv)
ccprintf("I8042_XLATE: %d\n", controller_ram[0] & I8042_XLATE ? 1 : 0);
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(codeset, command_codeset,
- "[set]",
- "Get/set keyboard codeset");
-
static int command_controller_ram(int argc, char **argv)
{
@@ -1115,9 +1107,6 @@ static int command_controller_ram(int argc, char **argv)
ccprintf("%d = 0x%02x\n", index, controller_ram[index]);
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(ctrlram, command_controller_ram,
- "index [value]",
- "Get/set keyboard controller RAM");
static int command_keyboard_log(int argc, char **argv)
{
@@ -1161,11 +1150,6 @@ static int command_keyboard_log(int argc, char **argv)
return EC_SUCCESS;
}
-#if CMD_KEYBOARD_LOG
-DECLARE_CONSOLE_COMMAND(kblog, command_keyboard_log,
- "[on | off]",
- "Print or toggle keyboard event log");
-#endif
static int command_keyboard(int argc, char **argv)
{
@@ -1181,10 +1165,6 @@ static int command_keyboard(int argc, char **argv)
ccprintf("Enabled: %d\n", keyboard_enabled);
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(kbd, command_keyboard,
- "[on | off]",
- "Print or toggle keyboard info");
-
static int command_8042_internal(int argc, char **argv)
{
@@ -1229,6 +1209,24 @@ static int command_8042_internal(int argc, char **argv)
return EC_SUCCESS;
}
+/* Zephyr only provides these as subcommands*/
+#ifndef CONFIG_ZEPHYR
+DECLARE_CONSOLE_COMMAND(typematic, command_typematic,
+ "[first] [inter]",
+ "Get/set typematic delays");
+DECLARE_CONSOLE_COMMAND(codeset, command_codeset,
+ "[set]",
+ "Get/set keyboard codeset");
+DECLARE_CONSOLE_COMMAND(ctrlram, command_controller_ram,
+ "index [value]",
+ "Get/set keyboard controller RAM");
+DECLARE_CONSOLE_COMMAND(kblog, command_keyboard_log,
+ "[on | off]",
+ "Print or toggle keyboard event log");
+DECLARE_CONSOLE_COMMAND(kbd, command_keyboard,
+ "[on | off]",
+ "Print or toggle keyboard info");
+#endif
static int command_8042(int argc, char **argv)
{