diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-04 13:23:38 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-04 22:16:06 +0000 |
commit | ed33a68e353116fb99137e0efb5d49fc3182ab3b (patch) | |
tree | c0417f52cad4b765af2305a851f3b6f15df92ad9 /board/volteer | |
parent | 9e6b115fb90d006cdae3d72e74690f035dc55115 (diff) | |
download | chrome-ec-ed33a68e353116fb99137e0efb5d49fc3182ab3b.tar.gz |
volteer: Split out keyboard config into its own file
Move this out of board.c so that zephyr can build it.
BUG=b:167405015
BRANCH=none
TEST=make -j30 BOARD=volteer
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I556dfef96b608991697dbf298baa3e73ead051bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2675238
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 18 | ||||
-rw-r--r-- | board/volteer/build.mk | 1 | ||||
-rw-r--r-- | board/volteer/keyboard.c | 26 |
3 files changed, 27 insertions, 18 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index e456f1e299..a47bee1747 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -20,8 +20,6 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" -#include "keyboard_raw.h" -#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -42,22 +40,6 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) -/* 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 */ - }, -}; - /******************************************************************************/ /* Physical fans. These are logically separate from pwm_channels. */ diff --git a/board/volteer/build.mk b/board/volteer/build.mk index 76c2a1330c..6479c8246b 100644 --- a/board/volteer/build.mk +++ b/board/volteer/build.mk @@ -15,5 +15,6 @@ 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 new file mode 100644 index 0000000000..aeed7d7c63 --- /dev/null +++ b/board/volteer/keyboard.c @@ -0,0 +1,26 @@ +/* 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 */ + }, +}; |