diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2021-07-21 10:05:07 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-23 05:55:04 +0000 |
commit | 330293d53543cd9af5fbf85fb031f83a940b6d59 (patch) | |
tree | b5ccec3765f6317e386d19f0d8cb69472bf03c34 /board/volteer | |
parent | 916fa64ce70441acb9928fda963282d0d5772b63 (diff) | |
download | chrome-ec-330293d53543cd9af5fbf85fb031f83a940b6d59.tar.gz |
keyboard: Use __override for keyboard_scan_config
Currently keyboard_scan_config is defined by each board using
CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as
__override hence removes CONFIG_KEYBOARD_BOARD_CONFIG.
BUG=None
BRANCH=None
TEST=buildall
Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 19 | ||||
-rw-r--r-- | board/volteer/build.mk | 1 | ||||
-rw-r--r-- | board/volteer/keyboard.c | 26 |
3 files changed, 19 insertions, 27 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index a47bee1747..1112b4b4f3 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -20,6 +20,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -30,6 +31,7 @@ #include "task.h" #include "tablet_mode.h" #include "throttle_ap.h" +#include "timer.h" #include "uart.h" #include "usb_pd.h" #include "usb_pd_tbt.h" @@ -41,6 +43,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) /******************************************************************************/ +/* Keyboard scan setting */ +__override struct keyboard_scan_config keyscan_config = { + /* Increase from 50 us, because KSO_02 passes through the H1. */ + .output_settle_us = 80, + /* Other values should be the same as the default configuration. */ + .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 /* full set */ + }, +}; + +/******************************************************************************/ /* Physical fans. These are logically separate from pwm_channels. */ const struct fan_conf fan_conf_0 = { diff --git a/board/volteer/build.mk b/board/volteer/build.mk index abd41ab0a4..5adcffff56 100644 --- a/board/volteer/build.mk +++ b/board/volteer/build.mk @@ -21,6 +21,5 @@ board-y=board.o board-y+=battery.o board-y+=cbi.o board-y+=led.o -board-y+=keyboard.o board-y+=sensors.o board-y+=usbc_config.o diff --git a/board/volteer/keyboard.c b/board/volteer/keyboard.c deleted file mode 100644 index aeed7d7c63..0000000000 --- a/board/volteer/keyboard.c +++ /dev/null @@ -1,26 +0,0 @@ -/* 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. - */ - -/* Keyboard config common to ECOS and zephyr */ - -#include "keyboard_raw.h" -#include "keyboard_scan.h" -#include "timer.h" - -/* Keyboard scan setting */ -struct keyboard_scan_config keyscan_config = { - /* Increase from 50 us, because KSO_02 passes through the H1. */ - .output_settle_us = 80, - /* Other values should be the same as the default configuration. */ - .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 /* full set */ - }, -}; |