summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-07-23 14:03:44 -0700
committerChromeBot <chrome-bot@google.com>2013-07-23 17:37:54 -0700
commit8b816367803f9574a2176a6c21c1021512f0b5ec (patch)
tree7ea96a6da7e037654ec0ab4260e51472ba3701f2
parentcb1f7306b34507b3d9481cd4327271b2227747b8 (diff)
downloadchrome-ec-8b816367803f9574a2176a6c21c1021512f0b5ec.tar.gz
Clean up and document keyboard config options
No functional changes, just renaming config options. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: Ie811066a26eeaf2a5b2002b934e25b660d29058d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63109 Reviewed-by: Vic Yang <victoryang@chromium.org>
-rw-r--r--README8
-rw-r--r--board/falco/board.h2
-rw-r--r--board/link/board.h2
-rw-r--r--board/peppy/board.h2
-rw-r--r--board/slippy/board.h2
-rw-r--r--board/wolf/board.h2
-rw-r--r--common/keyboard_8042.c2
-rw-r--r--common/keyboard_scan.c3
-rw-r--r--include/config.h36
9 files changed, 41 insertions, 18 deletions
diff --git a/README b/README
index 8239b4c022..c895d8e0ad 100644
--- a/README
+++ b/README
@@ -43,11 +43,3 @@ below will be moved there over time.
the AP indicating this state. The GPIO will be driven low when
AC power is not connected, and high when it is connected. This
uses GPIO_AC_STATUS for this purpose.
-
-- CONFIG_KEYBOARD_TEST
-
- Turn on keyboard testing functionality. This enables a message which
- received a list of keyscan events from the AP and processes them.
- This will cause keypresses to appear on the AP through the same
- mechanism as a normal keyboard press.
-
diff --git a/board/falco/board.h b/board/falco/board.h
index d3c5dfd215..5e8633b1d6 100644
--- a/board/falco/board.h
+++ b/board/falco/board.h
@@ -20,8 +20,8 @@
#define CONFIG_CHIPSET_HASWELL
#endif
#define CONFIG_CMD_DISCHARGE_ON_AC
-#define CONFIG_CUSTOM_KEYSCAN
#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef HAS_TASK_KEYPROTO
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif
diff --git a/board/link/board.h b/board/link/board.h
index a84bf1f8a1..50a8049836 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -18,9 +18,9 @@
#ifdef HAS_TASK_CHIPSET
#define CONFIG_CHIPSET_IVYBRIDGE
#endif
-#define CONFIG_CUSTOM_KEYSCAN
#define CONFIG_EXTPOWER_GPIO
#define CONFIG_I2C_PASSTHRU_RESTRICTED
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef HAS_TASK_KEYPROTO
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif
diff --git a/board/peppy/board.h b/board/peppy/board.h
index 3bdd58bd00..22de835d20 100644
--- a/board/peppy/board.h
+++ b/board/peppy/board.h
@@ -20,8 +20,8 @@
#define CONFIG_CHIPSET_HASWELL
#endif
#define CONFIG_CMD_DISCHARGE_ON_AC
-#define CONFIG_CUSTOM_KEYSCAN
#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef HAS_TASK_KEYPROTO
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif
diff --git a/board/slippy/board.h b/board/slippy/board.h
index 0211f06b1b..cd4562f2f7 100644
--- a/board/slippy/board.h
+++ b/board/slippy/board.h
@@ -20,8 +20,8 @@
#define CONFIG_CHIPSET_HASWELL
#endif
#define CONFIG_CMD_DISCHARGE_ON_AC
-#define CONFIG_CUSTOM_KEYSCAN
#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef HAS_TASK_KEYPROTO
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif
diff --git a/board/wolf/board.h b/board/wolf/board.h
index 90e8f57612..8198ed0ddb 100644
--- a/board/wolf/board.h
+++ b/board/wolf/board.h
@@ -13,8 +13,8 @@
#ifdef HAS_TASK_CHIPSET
#define CONFIG_CHIPSET_HASWELL
#endif
-#define CONFIG_CUSTOM_KEYSCAN
#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#ifdef HAS_TASK_KEYPROTO
#define CONFIG_KEYBOARD_PROTOCOL_8042
#endif
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c
index 723b091c90..5cccc1dd82 100644
--- a/common/keyboard_8042.c
+++ b/common/keyboard_8042.c
@@ -28,7 +28,7 @@
#define CPUTS(outstr) cputs(CC_KEYBOARD, outstr)
#define CPRINTF(format, args...) cprintf(CC_KEYBOARD, format, ## args)
-#ifdef CONFIG_KEYBOARD_DEBUG_MORE
+#ifdef CONFIG_KEYBOARD_DEBUG
#define CPUTS5(outstr) cputs(CC_KEYBOARD, outstr)
#define CPRINTF5(format, args...) cprintf(CC_KEYBOARD, format, ## args)
#else
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 95394272ed..76db0b58f9 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -26,7 +26,8 @@
#define SCAN_TIME_COUNT 32 /* Number of last scan times to track */
-#ifndef CONFIG_CUSTOM_KEYSCAN
+#ifndef CONFIG_KEYBOARD_BOARD_CONFIG
+/* Use default keyboard scan config, because board didn't supply one */
struct keyboard_scan_config keyscan_config = {
.output_settle_us = 50,
.debounce_down_us = 9 * MSEC,
diff --git a/include/config.h b/include/config.h
index 0f8ca564b6..917ba785fb 100644
--- a/include/config.h
+++ b/include/config.h
@@ -131,8 +131,6 @@
#undef CONFIG_CONSOLE_RESTRICTED_INPUT
#undef CONFIG_CONSOLE_UART
-#undef CONFIG_CUSTOM_KEYSCAN
-
/*****************************************************************************/
/*
* Debugging config
@@ -241,12 +239,44 @@
#undef CONFIG_IRQ_COUNT
-#undef CONFIG_KEYBOARD_DEBUG_MORE
+/*****************************************************************************/
+/* Keyboard config */
+
+/* Enable extra debugging output from keyboard modules */
+#undef CONFIG_KEYBOARD_DEBUG
+
+/* Compile code for 8042 keyboard protocol */
#undef CONFIG_KEYBOARD_PROTOCOL_8042
+
+/* Compile code for MKBP keyboard protocol */
#undef CONFIG_KEYBOARD_PROTOCOL_MKBP
+
+/*
+ * Keyboard config (struct keyboard_scan_config) is in board.c. If this is
+ * not defined, default values from common/keyboard_scan.c will be used.
+ */
+#undef CONFIG_KEYBOARD_BOARD_CONFIG
+
+/*
+ * Call board-supplied keyboard_suppress_noise() function when the debounced
+ * keyboard state changes. Some boards use this to send a signal to the audio
+ * codec to suppress typing noise picked up by the microphone.
+ */
#undef CONFIG_KEYBOARD_SUPPRESS_NOISE
+
+/*
+ * Enable keyboard testing functionality. This enables a message which receives
+ * a list of keyscan events from the AP and processes them. This will cause
+ * keypresses to appear on the AP through the same mechanism as a normal
+ * keyboard press.
+ *
+ * This can be used to spoof keyboard events, so is not normally defined,
+ * except during internal testing.
+ */
#undef CONFIG_KEYBOARD_TEST
+/*****************************************************************************/
+
#undef CONFIG_LED_DRIVER_LP5562
#undef CONFIG_LED_FALCO
#undef CONFIG_LED_PEPPY