summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-10-29 18:31:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-31 21:59:22 -0700
commit9f42d8f5197f92daf43705cd36438619ff8fc8a4 (patch)
treeb14d985d88721c4372b54069774d6e8f5c16270c
parentf988a2f81baa46dc0207d47684b2c87d19fd96ae (diff)
downloadchrome-ec-9f42d8f5197f92daf43705cd36438619ff8fc8a4.tar.gz
Nami: Add keymasks for page-up/down, home, end, delete
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:117126568 BRANCH=none TEST=Verified all keys on keypad work as expected. Change-Id: If23b422c1260b8437c59fd13a9280e8d6e87f94b Reviewed-on: https://chromium-review.googlesource.com/1311374 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--board/nami/board.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/board/nami/board.c b/board/nami/board.c
index c26619af5f..6de438027b 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -908,6 +908,26 @@ static void cbi_init(void)
}
DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_INIT_I2C + 1);
+/* Keyboard scan setting */
+struct keyboard_scan_config keyscan_config = {
+ /*
+ * F3 key scan cycle completed but scan input is not
+ * charging to logic high when EC start scan next
+ * column for "T" key, so we set .output_settle_us
+ * to 80us from 50us.
+ */
+ .output_settle_us = 80,
+ .debounce_down_us = 9 * MSEC,
+ .debounce_up_us = 30 * MSEC,
+ .scan_period_us = 3 * MSEC,
+ .min_post_scan_delay_us = 1000,
+ .poll_timeout_us = 100 * MSEC,
+ .actual_key_mask = {
+ 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
+ 0xa4, 0xff, 0xfe, 0x55, 0xfe, 0xff, 0xff, 0xff, /* full set */
+ },
+};
+
static void board_init(void)
{
int reg;
@@ -946,32 +966,15 @@ static void board_init(void)
#ifndef TEST_BUILD
/* Disable scanning KSO13 & 14 if keypad isn't present. */
- if (!(sku & SKU_ID_MASK_KEYPAD))
+ if (!(sku & SKU_ID_MASK_KEYPAD)) {
keyboard_raw_set_cols(KEYBOARD_COLS_NO_KEYPAD);
+ keyscan_config.actual_key_mask[11] = 0xfa;
+ keyscan_config.actual_key_mask[12] = 0xca;
+ }
#endif
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
-/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
- /*
- * F3 key scan cycle completed but scan input is not
- * charging to logic high when EC start scan next
- * column for "T" key, so we set .output_settle_us
- * to 80us from 50us.
- */
- .output_settle_us = 80,
- .debounce_down_us = 9 * MSEC,
- .debounce_up_us = 30 * MSEC,
- .scan_period_us = 3 * MSEC,
- .min_post_scan_delay_us = 1000,
- .poll_timeout_us = 100 * MSEC,
- .actual_key_mask = {
- 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
- 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca, 0xff, 0xff, /* full set */
- },
-};
-
int board_is_lid_angle_tablet_mode(void)
{
/* Boards with no GMR sensor use lid angles to detect tablet mode. */