summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-01-28 09:04:34 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-01 19:26:49 +0000
commit96f2585d7399cd614028bce25b5e90fee26c063c (patch)
tree6a3830c31df7be7a61e3ce2d10ea7c03e80c557f
parent5574318e3d30fc1fc1774976baddddebbe14a053 (diff)
downloadchrome-ec-96f2585d7399cd614028bce25b5e90fee26c063c.tar.gz
zephyr: move keyboard KConfig into separate file
Reorganinze KConfig options related to keyboard support into a separate file. BUG=b:167405015 BRANCH=none TEST=make buildall TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6052f9b0c9be85265f0d42ac69f855d9f6854b40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657403 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--zephyr/Kconfig59
-rw-r--r--zephyr/Kconfig.keyboard61
2 files changed, 62 insertions, 58 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 5c0ef4fcd2..6b5f9e8ec5 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -32,6 +32,7 @@ menuconfig PLATFORM_EC
if PLATFORM_EC
rsource "Kconfig.battery"
+rsource "Kconfig.keyboard"
rsource "Kconfig.led"
rsource "Kconfig.powerseq"
rsource "Kconfig.motionsense"
@@ -231,64 +232,6 @@ config PLATFORM_EC_MAPPED_STORAGE
endif # PLATFORM_EC_FLASH
-menuconfig PLATFORM_EC_KEYBOARD
- bool "Keyboard support"
- select HAS_TASK_KEYSCAN
- default n if ARCH_POSIX
- default y
- help
- Enable compilation of support for scanning a keyboard and providing
- the resulting input to the AP over the host interface. This consists
- of a keyboard-scanning task which provides key scans via it calling
- keyboard_state_changed() (for i8042) or its client calling
- keyboard_scan_get_state() (for MKBP).
-
- Enabling this automatically enables HAS_TASK_KEYSCAN since keyboard
- scanning must run in its own task.
-
-if PLATFORM_EC_KEYBOARD
-
-choice "Protocol select"
- prompt "Select the keyboard protocol to use"
-
-config PLATFORM_EC_KEYBOARD_PROTOCOL_8042
- bool "i8042"
- select HAS_TASK_KEYPROTO
- help
- Use the i8042 protocol to communicate with the AP. This dates from the
- Intel 8042 keyboard controller chip released in 1976. It uses two-way
- communication via a few 8-bit registers, allowing key codes to be
- sent to the AP when keys are pressed and released.
-
- See here for docs: https://wiki.osdev.org/%228042%22_PS/2_Controller
-
-endchoice # PLATFORM_EC_KEYBOARD
-
-config PLATFORM_EC_KEYBOARD_COL2_INVERTED
- bool "A mechanism for passing KSO2 to H1 which inverts the signal"
- help
- This option enables a mechanism for passing the column 2
- to H1 which inverts the signal. The signal passing through H1
- adds more delay. Need a larger delay value. Otherwise, pressing
- Refresh key will also trigger T key, which is in the next scanning
- column line. See http://b/156007029.
-
-config PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042
- bool "Console command: i8042"
- default y if PLATFORM_EC_KEYBOARD_PROTOCOL_8042
- help
- This command prints the state of the i8042 keyboard protocol and
- includes the following subcommands:
-
- codeset - Get/set keyboard codeset
- ctrlram - Get/set keyboard controller RAM
- internal - Show internal information
- kbd - Print or toggle keyboard info
- kblog - Print or toggle keyboard event log (current disabled)
- typematic - Get/set typematic delays
-
-endif # PLATFORM_EC_KEYBOARD
-
config PLATFORM_EC_HOOKS
bool "Hooks and deferred compatibility shim"
default y
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
new file mode 100644
index 0000000000..1a8ad93075
--- /dev/null
+++ b/zephyr/Kconfig.keyboard
@@ -0,0 +1,61 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+menuconfig PLATFORM_EC_KEYBOARD
+ bool "Keyboard support"
+ select HAS_TASK_KEYSCAN
+ default n if ARCH_POSIX
+ default y
+ help
+ Enable compilation of support for scanning a keyboard and providing
+ the resulting input to the AP over the host interface. This consists
+ of a keyboard-scanning task which provides key scans via it calling
+ keyboard_state_changed() (for i8042) or its client calling
+ keyboard_scan_get_state() (for MKBP).
+
+ Enabling this automatically enables HAS_TASK_KEYSCAN since keyboard
+ scanning must run in its own task.
+
+if PLATFORM_EC_KEYBOARD
+
+choice "Protocol select"
+ prompt "Select the keyboard protocol to use"
+
+config PLATFORM_EC_KEYBOARD_PROTOCOL_8042
+ bool "i8042"
+ select HAS_TASK_KEYPROTO
+ help
+ Use the i8042 protocol to communicate with the AP. This dates from the
+ Intel 8042 keyboard controller chip released in 1976. It uses two-way
+ communication via a few 8-bit registers, allowing key codes to be
+ sent to the AP when keys are pressed and released.
+
+ See here for docs: https://wiki.osdev.org/%228042%22_PS/2_Controller
+
+endchoice # PLATFORM_EC_KEYBOARD
+
+config PLATFORM_EC_KEYBOARD_COL2_INVERTED
+ bool "A mechanism for passing KSO2 to H1 which inverts the signal"
+ help
+ This option enables a mechanism for passing the column 2
+ to H1 which inverts the signal. The signal passing through H1
+ adds more delay. Need a larger delay value. Otherwise, pressing
+ Refresh key will also trigger T key, which is in the next scanning
+ column line. See http://b/156007029.
+
+config PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042
+ bool "Console command: i8042"
+ default y if PLATFORM_EC_KEYBOARD_PROTOCOL_8042
+ help
+ This command prints the state of the i8042 keyboard protocol and
+ includes the following subcommands:
+
+ codeset - Get/set keyboard codeset
+ ctrlram - Get/set keyboard controller RAM
+ internal - Show internal information
+ kbd - Print or toggle keyboard info
+ kblog - Print or toggle keyboard event log (current disabled)
+ typematic - Get/set typematic delays
+
+endif # PLATFORM_EC_KEYBOARD