summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2021-03-24 14:54:55 +0000
committerCommit Bot <commit-bot@chromium.org>2021-04-06 17:39:40 +0000
commit42a750d21c2fd2dcc33d24c0a03c2800a1ceccbc (patch)
tree78186d0e1b8d6b5fd2a2aba26238ea4031f5268f
parent04bbd289ec5f4c62e39784b848edfcb5f55ea3c0 (diff)
downloadchrome-ec-42a750d21c2fd2dcc33d24c0a03c2800a1ceccbc.tar.gz
nightfury: Change down debounce time to 30ms
This patch is implementation of CL:2744760 from firmware-hatch-12672.B for ToT. This change can't be cherry-picked because CL:2194160 removes keyscan_config structure from baseboard/hatch/baseboard.c. BUG=b:181307934 BRANCH=none TEST=make BOARD=nightfury Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I070390b1f4f13dcce5a93ed0c8982b82a3574d6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784642 Reviewed-by: Boris Mittelberg <bmbm@google.com>
-rw-r--r--board/nightfury/board.c14
-rw-r--r--board/nightfury/board.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/board/nightfury/board.c b/board/nightfury/board.c
index 8b0713e216..968274b221 100644
--- a/board/nightfury/board.c
+++ b/board/nightfury/board.c
@@ -26,6 +26,7 @@
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
+#include "keyboard_scan.h"
#include "lid_switch.h"
#include "power.h"
#include "power_button.h"
@@ -304,6 +305,19 @@ const struct motion_sensor_t *motion_als_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(motion_als_sensors) == ALS_COUNT);
+struct keyboard_scan_config keyscan_config = {
+ .output_settle_us = 80,
+ .debounce_down_us = 30 * 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 = {
+ 0x1c, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
+ 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
+ },
+};
+
/******************************************************************************/
/* Physical fans. These are logically separate from pwm_channels. */
diff --git a/board/nightfury/board.h b/board/nightfury/board.h
index 7f06cd2ae2..60fd429fc4 100644
--- a/board/nightfury/board.h
+++ b/board/nightfury/board.h
@@ -16,6 +16,7 @@
#define CONFIG_POWER_BUTTON
#define CONFIG_KEYBOARD_PROTOCOL_8042
+#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_LED_COMMON
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_LED_POWER_LED