summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/brya/baseboard.h2
-rw-r--r--baseboard/dragonegg/baseboard.c2
-rw-r--r--baseboard/dragonegg/baseboard.h2
-rw-r--r--baseboard/grunt/baseboard.c2
-rw-r--r--baseboard/grunt/baseboard.h2
-rw-r--r--baseboard/guybrush/baseboard.c2
-rw-r--r--baseboard/guybrush/baseboard.h2
-rw-r--r--baseboard/intelrvp/baseboard.h2
-rw-r--r--baseboard/intelrvp/ite_ec.c2
-rw-r--r--baseboard/intelrvp/mchp_ec.c2
-rw-r--r--baseboard/intelrvp/npcx_ec.c2
-rw-r--r--baseboard/ite_evb/baseboard.c4
-rw-r--r--baseboard/ite_evb/baseboard.h2
-rw-r--r--baseboard/kukui/baseboard.h2
-rw-r--r--baseboard/octopus/baseboard.c2
-rw-r--r--baseboard/octopus/baseboard.h2
-rw-r--r--baseboard/volteer/baseboard.h2
-rw-r--r--baseboard/zork/baseboard.c2
-rw-r--r--baseboard/zork/baseboard.h2
-rw-r--r--board/atlas/board.c2
-rw-r--r--board/atlas/board.h2
-rw-r--r--board/boldar/board.c2
-rw-r--r--board/brya/keyboard.c2
-rw-r--r--board/burnet/board.c2
-rw-r--r--board/cerise/board.c2
-rw-r--r--board/chronicler/keyboard.c2
-rw-r--r--board/collis/board.c2
-rw-r--r--board/copano/board.c2
-rw-r--r--board/coral/board.c2
-rw-r--r--board/coral/board.h2
-rw-r--r--board/damu/board.c2
-rw-r--r--board/delbin/board.c2
-rw-r--r--board/drobit/board.c2
-rw-r--r--board/eldrid/board.c2
-rw-r--r--board/elemi/board.c2
-rw-r--r--board/eve/board.c2
-rw-r--r--board/eve/board.h2
-rw-r--r--board/fennel/board.c2
-rw-r--r--board/gimble/keyboard.c2
-rw-r--r--board/glkrvp_ite/board.c2
-rw-r--r--board/glkrvp_ite/board.h2
-rw-r--r--board/halvor/board.c2
-rw-r--r--board/hammer/board.c4
-rw-r--r--board/hammer/variants.h2
-rw-r--r--board/herobrine_npcx7/board.c2
-rw-r--r--board/herobrine_npcx7/board.h2
-rw-r--r--board/herobrine_npcx9/board.c2
-rw-r--r--board/herobrine_npcx9/board.h2
-rw-r--r--board/it8xxx2_pdevb/board.h1
-rw-r--r--board/jacuzzi/board.c2
-rw-r--r--board/kano/keyboard.c2
-rw-r--r--board/kappa/board.c2
-rw-r--r--board/lalala/board.c2
-rw-r--r--board/lalala/board.h2
-rw-r--r--board/lazor/board.c2
-rw-r--r--board/lazor/board.h2
-rw-r--r--board/lindar/board.c2
-rw-r--r--board/lingcod/board.c2
-rw-r--r--board/magolor/board.c2
-rw-r--r--board/magolor/board.h2
-rw-r--r--board/makomo/board.c2
-rw-r--r--board/malefor/board.c2
-rw-r--r--board/marzipan/board.c2
-rw-r--r--board/marzipan/board.h2
-rw-r--r--board/munna/board.c2
-rw-r--r--board/nami/board.c2
-rw-r--r--board/nami/board.h2
-rw-r--r--board/nightfury/board.c2
-rw-r--r--board/nightfury/board.h2
-rw-r--r--board/npcx7_evb/board.c2
-rw-r--r--board/npcx7_evb/board.h2
-rw-r--r--board/npcx9_evb/board.c2
-rw-r--r--board/npcx9_evb/board.h2
-rw-r--r--board/npcx_evb/board.c2
-rw-r--r--board/npcx_evb/board.h2
-rw-r--r--board/npcx_evb_arm/board.c2
-rw-r--r--board/npcx_evb_arm/board.h2
-rw-r--r--board/pazquel/board.c2
-rw-r--r--board/pazquel/board.h2
-rw-r--r--board/pirika/board.c2
-rw-r--r--board/pirika/board.h2
-rw-r--r--board/pompom/board.c2
-rw-r--r--board/pompom/board.h2
-rw-r--r--board/primus/keyboard.c2
-rw-r--r--board/redrix/keyboard.c2
-rw-r--r--board/reef/board.c2
-rw-r--r--board/reef/board.h2
-rw-r--r--board/reef_it8320/board.c2
-rw-r--r--board/reef_it8320/board.h2
-rw-r--r--board/reef_mchp/board.c2
-rw-r--r--board/reef_mchp/board.h2
-rw-r--r--board/samus/board.c2
-rw-r--r--board/samus/board.h2
-rw-r--r--board/stern/board.c2
-rw-r--r--board/taeko/keyboard.c2
-rw-r--r--board/terrador/board.c2
-rw-r--r--board/todor/board.c2
-rw-r--r--board/trogdor/board.c2
-rw-r--r--board/trogdor/board.h2
-rw-r--r--board/trondo/board.c2
-rw-r--r--board/voema/board.c2
-rw-r--r--board/volet/board.c2
-rw-r--r--board/volteer/board.c19
-rw-r--r--board/volteer/build.mk1
-rw-r--r--board/volteer/keyboard.c26
-rw-r--r--board/voxel/board.c2
-rw-r--r--board/waddledoo2/board.c2
-rw-r--r--board/waddledoo2/board.h2
-rw-r--r--board/willow/board.c2
-rw-r--r--common/keyboard_scan.c5
-rw-r--r--docs/configuration/keyboard.md4
-rw-r--r--include/config.h6
-rw-r--r--include/keyboard_scan.h2
-rw-r--r--zephyr/Kconfig.keyboard10
-rw-r--r--zephyr/projects/volteer/volteer/CMakeLists.txt2
-rw-r--r--zephyr/projects/volteer/volteer/prj.conf1
-rw-r--r--zephyr/shim/include/config_chip.h5
117 files changed, 128 insertions, 168 deletions
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h
index 9f7b817278..6a4efe942e 100644
--- a/baseboard/brya/baseboard.h
+++ b/baseboard/brya/baseboard.h
@@ -117,7 +117,7 @@
/* Common Keyboard Defines */
#define CONFIG_CMD_KEYBOARD
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_KEYPAD
#define CONFIG_KEYBOARD_PROTOCOL_8042
diff --git a/baseboard/dragonegg/baseboard.c b/baseboard/dragonegg/baseboard.c
index 2301a9cb0f..acbeadcf32 100644
--- a/baseboard/dragonegg/baseboard.c
+++ b/baseboard/dragonegg/baseboard.c
@@ -42,7 +42,7 @@
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/dragonegg/baseboard.h b/baseboard/dragonegg/baseboard.h
index a22ad924e9..47edb8f314 100644
--- a/baseboard/dragonegg/baseboard.h
+++ b/baseboard/dragonegg/baseboard.h
@@ -44,7 +44,7 @@
/* Common Keyboard Defines */
#define CONFIG_CMD_KEYBOARD
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c
index 35997db8d5..9d06fd4b78 100644
--- a/baseboard/grunt/baseboard.c
+++ b/baseboard/grunt/baseboard.c
@@ -482,7 +482,7 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/grunt/baseboard.h b/baseboard/grunt/baseboard.h
index 5206b0a5a2..c97ece285f 100644
--- a/baseboard/grunt/baseboard.h
+++ b/baseboard/grunt/baseboard.h
@@ -101,7 +101,7 @@
*/
#define CONFIG_BOARD_RESET_AFTER_POWER_ON
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c
index e20528f288..18da982b99 100644
--- a/baseboard/guybrush/baseboard.c
+++ b/baseboard/guybrush/baseboard.c
@@ -465,7 +465,7 @@ BUILD_ASSERT(ARRAY_SIZE(ioex_config) == USBC_PORT_COUNT);
BUILD_ASSERT(CONFIG_IO_EXPANDER_PORT_COUNT == USBC_PORT_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h
index 1f8bf58094..abe5dddf0b 100644
--- a/baseboard/guybrush/baseboard.h
+++ b/baseboard/guybrush/baseboard.h
@@ -102,7 +102,7 @@
/* Keyboard Config */
#define CONFIG_KEYBOARD_BACKLIGHT
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_VIVALDI
diff --git a/baseboard/intelrvp/baseboard.h b/baseboard/intelrvp/baseboard.h
index 1ca3739d88..de4cb671ac 100644
--- a/baseboard/intelrvp/baseboard.h
+++ b/baseboard/intelrvp/baseboard.h
@@ -76,7 +76,7 @@
#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 15001
/* Keyboard */
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/baseboard/intelrvp/ite_ec.c b/baseboard/intelrvp/ite_ec.c
index d76d22bb63..bafddc5f9e 100644
--- a/baseboard/intelrvp/ite_ec.c
+++ b/baseboard/intelrvp/ite_ec.c
@@ -15,7 +15,7 @@
#include "usb_pd_tcpm.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 35,
.debounce_down_us = 5 * MSEC,
.debounce_up_us = 40 * MSEC,
diff --git a/baseboard/intelrvp/mchp_ec.c b/baseboard/intelrvp/mchp_ec.c
index adaba23d3a..2d6c203ef2 100644
--- a/baseboard/intelrvp/mchp_ec.c
+++ b/baseboard/intelrvp/mchp_ec.c
@@ -14,7 +14,7 @@
#include "usb_pd_tcpm.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/intelrvp/npcx_ec.c b/baseboard/intelrvp/npcx_ec.c
index c48e202f87..d6eca2e55b 100644
--- a/baseboard/intelrvp/npcx_ec.c
+++ b/baseboard/intelrvp/npcx_ec.c
@@ -12,7 +12,7 @@
#include "time.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 35,
.debounce_down_us = 5 * MSEC,
.debounce_up_us = 40 * MSEC,
diff --git a/baseboard/ite_evb/baseboard.c b/baseboard/ite_evb/baseboard.c
index 0bd537ef4f..00459b12bc 100644
--- a/baseboard/ite_evb/baseboard.c
+++ b/baseboard/ite_evb/baseboard.c
@@ -106,9 +106,8 @@ const struct fan_tach_t fan_tach[] = {
BUILD_ASSERT(ARRAY_SIZE(fan_tach) == PWM_HW_CH_TOTAL);
#endif /* defined(CONFIG_FANS) || defined(CONFIG_PWM) */
-#if defined(CONFIG_KEYBOARD_BOARD_CONFIG)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 35,
.debounce_down_us = 5 * MSEC,
.debounce_up_us = 40 * MSEC,
@@ -120,7 +119,6 @@ struct keyboard_scan_config keyscan_config = {
0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
},
};
-#endif
#if defined(CONFIG_SPI_FLASH_PORT)
/* SPI devices */
diff --git a/baseboard/ite_evb/baseboard.h b/baseboard/ite_evb/baseboard.h
index dfe289e3a6..7fe309491c 100644
--- a/baseboard/ite_evb/baseboard.h
+++ b/baseboard/ite_evb/baseboard.h
@@ -17,7 +17,7 @@
#define CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
#define CONFIG_IT83XX_SMCLK2_ON_GPC7
#define CONFIG_IT83XX_VCC_3P3V
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_LOW_POWER_S0
diff --git a/baseboard/kukui/baseboard.h b/baseboard/kukui/baseboard.h
index 90a3e3dd05..66b88cd534 100644
--- a/baseboard/kukui/baseboard.h
+++ b/baseboard/kukui/baseboard.h
@@ -104,7 +104,7 @@
#define CONFIG_IO_EXPANDER_IT8801
#define CONFIG_IO_EXPANDER_PORT_COUNT 1
#define CONFIG_KEYBOARD_NOT_RAW
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#endif
#define CONFIG_KEYBOARD_COL2_INVERTED
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c
index c9a3094e2e..89da53e6dc 100644
--- a/baseboard/octopus/baseboard.c
+++ b/baseboard/octopus/baseboard.c
@@ -32,7 +32,7 @@
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/octopus/baseboard.h b/baseboard/octopus/baseboard.h
index 059dec29d9..8b05c30f4c 100644
--- a/baseboard/octopus/baseboard.h
+++ b/baseboard/octopus/baseboard.h
@@ -264,7 +264,7 @@
/* Common Keyboard Defines */
#define CONFIG_CMD_KEYBOARD
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h
index 4ea3d81676..38a464813a 100644
--- a/baseboard/volteer/baseboard.h
+++ b/baseboard/volteer/baseboard.h
@@ -64,7 +64,7 @@
/* Common Keyboard Defines */
#define CONFIG_CMD_KEYBOARD
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_KEYPAD
#define CONFIG_KEYBOARD_PROTOCOL_8042
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index 5bbb0cc65a..41c859ad7b 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -105,7 +105,7 @@ __overridable void board_set_charge_limit(int port, int supplier, int charge_ma,
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index 60db6e1cb2..d84ebbcef8 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -122,7 +122,7 @@
#define CONFIG_IO_EXPANDER
#define CONFIG_IO_EXPANDER_NCT38XX
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#undef CONFIG_KEYBOARD_VIVALDI
diff --git a/board/atlas/board.c b/board/atlas/board.c
index ac617130ab..8d89bee074 100644
--- a/board/atlas/board.c
+++ b/board/atlas/board.c
@@ -70,7 +70,7 @@ static void tcpc_alert_event(enum gpio_signal signal)
#include "gpio_list.h"
/* Keyboard scan. Increase output_settle_us to 80us from default 50us. */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 80,
.debounce_down_us = 9 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/atlas/board.h b/board/atlas/board.h
index bc4844ee53..56685f1856 100644
--- a/board/atlas/board.h
+++ b/board/atlas/board.h
@@ -57,7 +57,7 @@
#define CONFIG_HOSTCMD_ESPI
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_REFRESH_ROW3
diff --git a/board/boldar/board.c b/board/boldar/board.c
index 357b2c9e46..59b7166123 100644
--- a/board/boldar/board.c
+++ b/board/boldar/board.c
@@ -51,7 +51,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/brya/keyboard.c b/board/brya/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/brya/keyboard.c
+++ b/board/brya/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/burnet/board.c b/board/burnet/board.c
index f7d53ac726..a272702ebe 100644
--- a/board/burnet/board.c
+++ b/board/burnet/board.c
@@ -90,7 +90,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/cerise/board.c b/board/cerise/board.c
index 8ca775b8e8..83884bd42f 100644
--- a/board/cerise/board.c
+++ b/board/cerise/board.c
@@ -88,7 +88,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/chronicler/keyboard.c b/board/chronicler/keyboard.c
index aeed7d7c63..b9cc378295 100644
--- a/board/chronicler/keyboard.c
+++ b/board/chronicler/keyboard.c
@@ -10,7 +10,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/collis/board.c b/board/collis/board.c
index a5b561c3d0..5f643c8aa7 100644
--- a/board/collis/board.c
+++ b/board/collis/board.c
@@ -46,7 +46,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/copano/board.c b/board/copano/board.c
index deb9f3f951..23395b0a61 100644
--- a/board/copano/board.c
+++ b/board/copano/board.c
@@ -46,7 +46,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/coral/board.c b/board/coral/board.c
index d3be3c411a..d79aeef8c6 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -990,7 +990,7 @@ __override uint32_t board_get_sku_id(void)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/coral/board.h b/board/coral/board.h
index 4316d991f1..24b0ecf86e 100644
--- a/board/coral/board.h
+++ b/board/coral/board.h
@@ -124,7 +124,7 @@
#define CONFIG_HOSTCMD_FLASH_SPI_INFO
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/board/damu/board.c b/board/damu/board.c
index 38f354d251..c45d4e37a8 100644
--- a/board/damu/board.c
+++ b/board/damu/board.c
@@ -88,7 +88,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/delbin/board.c b/board/delbin/board.c
index cb58616607..b1d7754992 100644
--- a/board/delbin/board.c
+++ b/board/delbin/board.c
@@ -44,7 +44,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/drobit/board.c b/board/drobit/board.c
index 71a236591d..3fb336976c 100644
--- a/board/drobit/board.c
+++ b/board/drobit/board.c
@@ -45,7 +45,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/eldrid/board.c b/board/eldrid/board.c
index 4e9dd5bb64..90d663e6f7 100644
--- a/board/eldrid/board.c
+++ b/board/eldrid/board.c
@@ -51,7 +51,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/elemi/board.c b/board/elemi/board.c
index b48dbc856e..5eab31d871 100644
--- a/board/elemi/board.c
+++ b/board/elemi/board.c
@@ -45,7 +45,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/eve/board.c b/board/eve/board.c
index 2bb1b42f46..31c9004da4 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -158,7 +158,7 @@ void anx74xx_cable_det_interrupt(enum gpio_signal signal)
#include "gpio_list.h"
/* Keyboard scan. Increase output_settle_us to 80us from default 50us. */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 80,
.debounce_down_us = 9 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/eve/board.h b/board/eve/board.h
index 6061f498a2..df80e4dccf 100644
--- a/board/eve/board.h
+++ b/board/eve/board.h
@@ -75,7 +75,7 @@
#define CONFIG_HOSTCMD_ESPI
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S3
#define CONFIG_HOSTCMD_ESPI_VW_SLP_S4
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#undef CONFIG_KEYBOARD_VIVALDI
#define CONFIG_KEYBOARD_PROTOCOL_8042
diff --git a/board/fennel/board.c b/board/fennel/board.c
index dcc812a4d6..92b23e3dfc 100644
--- a/board/fennel/board.c
+++ b/board/fennel/board.c
@@ -87,7 +87,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/gimble/keyboard.c b/board/gimble/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/gimble/keyboard.c
+++ b/board/gimble/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/glkrvp_ite/board.c b/board/glkrvp_ite/board.c
index b1102092b0..2a222ada7b 100644
--- a/board/glkrvp_ite/board.c
+++ b/board/glkrvp_ite/board.c
@@ -195,7 +195,7 @@ static void pmic_init(void)
DECLARE_HOOK(HOOK_INIT, pmic_init, HOOK_PRIO_INIT_I2C + 1);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 35,
.debounce_down_us = 5 * MSEC,
.debounce_up_us = 40 * MSEC,
diff --git a/board/glkrvp_ite/board.h b/board/glkrvp_ite/board.h
index 2816a02f86..da9313580b 100644
--- a/board/glkrvp_ite/board.h
+++ b/board/glkrvp_ite/board.h
@@ -52,7 +52,7 @@
#define DEDICATED_CHARGE_PORT 2
/* Keyboard */
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
/* UART */
diff --git a/board/halvor/board.c b/board/halvor/board.c
index 3f660c7f76..078d0520f6 100644
--- a/board/halvor/board.c
+++ b/board/halvor/board.c
@@ -41,7 +41,7 @@
#include "gpio_list.h" /* Must come after other header files. */
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/hammer/board.c b/board/hammer/board.c
index a9885cea81..911909653d 100644
--- a/board/hammer/board.c
+++ b/board/hammer/board.c
@@ -125,8 +125,7 @@ int usb_i2c_board_is_enabled(void)
return !system_is_locked();
}
-#ifdef CONFIG_KEYBOARD_BOARD_CONFIG
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 50,
.debounce_down_us = 9 * MSEC,
.debounce_up_us = 30 * MSEC,
@@ -139,7 +138,6 @@ struct keyboard_scan_config keyscan_config = {
},
};
#endif
-#endif
#if defined(BOARD_WAND) && defined(SECTION_IS_RW)
struct consumer const ec_ec_usart_consumer;
diff --git a/board/hammer/variants.h b/board/hammer/variants.h
index 60920dda53..fbfa985ba9 100644
--- a/board/hammer/variants.h
+++ b/board/hammer/variants.h
@@ -121,7 +121,7 @@
/* Assistant key */
#if defined(BOARD_HAMMER) || defined(BOARD_WAND) || defined(BOARD_WHISKERS)
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_ASSISTANT_KEY
#endif
diff --git a/board/herobrine_npcx7/board.c b/board/herobrine_npcx7/board.c
index 5d4e26ea38..b5f55ea10c 100644
--- a/board/herobrine_npcx7/board.c
+++ b/board/herobrine_npcx7/board.c
@@ -43,7 +43,7 @@ const enum gpio_signal hibernate_wake_pins[] = {
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/herobrine_npcx7/board.h b/board/herobrine_npcx7/board.h
index 197cf01209..68ca138e90 100644
--- a/board/herobrine_npcx7/board.h
+++ b/board/herobrine_npcx7/board.h
@@ -23,7 +23,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* Battery */
diff --git a/board/herobrine_npcx9/board.c b/board/herobrine_npcx9/board.c
index eaf6ed0399..620880b607 100644
--- a/board/herobrine_npcx9/board.c
+++ b/board/herobrine_npcx9/board.c
@@ -43,7 +43,7 @@ const enum gpio_signal hibernate_wake_pins[] = {
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/herobrine_npcx9/board.h b/board/herobrine_npcx9/board.h
index 1800d1255f..14a8366684 100644
--- a/board/herobrine_npcx9/board.h
+++ b/board/herobrine_npcx9/board.h
@@ -20,7 +20,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* Battery */
diff --git a/board/it8xxx2_pdevb/board.h b/board/it8xxx2_pdevb/board.h
index 3d92745f0e..8646c6c7b3 100644
--- a/board/it8xxx2_pdevb/board.h
+++ b/board/it8xxx2_pdevb/board.h
@@ -22,7 +22,6 @@
#undef CONFIG_FANS
#undef CONFIG_IT83XX_ENABLE_MOUSE_DEVICE
#undef CONFIG_IT83XX_SMCLK2_ON_GPC7
-#undef CONFIG_KEYBOARD_BOARD_CONFIG
#undef CONFIG_KEYBOARD_PROTOCOL_8042
#undef CONFIG_PECI
#undef CONFIG_PECI_COMMON
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index ae4a12b418..dcbd69b726 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -92,7 +92,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/kano/keyboard.c b/board/kano/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/kano/keyboard.c
+++ b/board/kano/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/kappa/board.c b/board/kappa/board.c
index 7030c71c72..538c4d957b 100644
--- a/board/kappa/board.c
+++ b/board/kappa/board.c
@@ -86,7 +86,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/lalala/board.c b/board/lalala/board.c
index 42d6659072..c7f6bb2b05 100644
--- a/board/lalala/board.c
+++ b/board/lalala/board.c
@@ -72,7 +72,7 @@ const int usb_port_enable[USB_PORT_COUNT] = {
};
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/lalala/board.h b/board/lalala/board.h
index 5113db18e1..1cbb6bf7e2 100644
--- a/board/lalala/board.h
+++ b/board/lalala/board.h
@@ -35,7 +35,7 @@
#define GPIO_USB_C1_INT_ODL GPIO_SUB_USB_C1_INT_ODL
/* Keyboard */
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_KEYPAD
#define CONFIG_PWM_KBLIGHT
diff --git a/board/lazor/board.c b/board/lazor/board.c
index 688df9f4c2..d04f282c00 100644
--- a/board/lazor/board.c
+++ b/board/lazor/board.c
@@ -38,7 +38,7 @@
#include "gpio_list.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/lazor/board.h b/board/lazor/board.h
index 937f34e709..406ed578fd 100644
--- a/board/lazor/board.h
+++ b/board/lazor/board.h
@@ -18,7 +18,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* Battery */
diff --git a/board/lindar/board.c b/board/lindar/board.c
index 57d9fdeb14..17d60a7f9b 100644
--- a/board/lindar/board.c
+++ b/board/lindar/board.c
@@ -45,7 +45,7 @@
#define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/lingcod/board.c b/board/lingcod/board.c
index 56e9fb067e..a8151b94e7 100644
--- a/board/lingcod/board.c
+++ b/board/lingcod/board.c
@@ -44,7 +44,7 @@
#define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/magolor/board.c b/board/magolor/board.c
index 08ae6f1a04..399ec040b2 100644
--- a/board/magolor/board.c
+++ b/board/magolor/board.c
@@ -73,7 +73,7 @@ const int usb_port_enable[USB_PORT_COUNT] = {
#ifdef BOARD_MAGOLOR
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/magolor/board.h b/board/magolor/board.h
index 8f8367f95f..c1f8ce3206 100644
--- a/board/magolor/board.h
+++ b/board/magolor/board.h
@@ -49,7 +49,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_FACTORY_TEST
#ifdef BOARD_MAGOLOR
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_KEYPAD
#endif
#define CONFIG_PWM_KBLIGHT
diff --git a/board/makomo/board.c b/board/makomo/board.c
index d0289a945d..1f1e3c3521 100644
--- a/board/makomo/board.c
+++ b/board/makomo/board.c
@@ -87,7 +87,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/malefor/board.c b/board/malefor/board.c
index 697ee909b9..059a1bf6da 100644
--- a/board/malefor/board.c
+++ b/board/malefor/board.c
@@ -45,7 +45,7 @@
#define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/marzipan/board.c b/board/marzipan/board.c
index 135e333b55..98716991cc 100644
--- a/board/marzipan/board.c
+++ b/board/marzipan/board.c
@@ -84,7 +84,7 @@ void board_connect_c0_sbu(enum gpio_signal s)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/marzipan/board.h b/board/marzipan/board.h
index 54054456eb..3ef8952ee5 100644
--- a/board/marzipan/board.h
+++ b/board/marzipan/board.h
@@ -15,7 +15,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* Battery */
diff --git a/board/munna/board.c b/board/munna/board.c
index 21def7d917..fe7cf484c4 100644
--- a/board/munna/board.c
+++ b/board/munna/board.c
@@ -89,7 +89,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/nami/board.c b/board/nami/board.c
index 2526cab319..27df3a1fe7 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -963,7 +963,7 @@ 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 = {
+__override 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
diff --git a/board/nami/board.h b/board/nami/board.h
index b2bb4c5dae..c9f6c34d82 100644
--- a/board/nami/board.h
+++ b/board/nami/board.h
@@ -28,7 +28,7 @@
#define CONFIG_FPU
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_KEYPAD
diff --git a/board/nightfury/board.c b/board/nightfury/board.c
index 9e73ca19e8..604e406c40 100644
--- a/board/nightfury/board.c
+++ b/board/nightfury/board.c
@@ -305,7 +305,7 @@ const struct motion_sensor_t *motion_als_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(motion_als_sensors) == ALS_COUNT);
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 80,
.debounce_down_us = 30 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/nightfury/board.h b/board/nightfury/board.h
index 687fc910f4..31207b2a52 100644
--- a/board/nightfury/board.h
+++ b/board/nightfury/board.h
@@ -16,7 +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
diff --git a/board/npcx7_evb/board.c b/board/npcx7_evb/board.c
index 5fa421d917..42514c2432 100644
--- a/board/npcx7_evb/board.c
+++ b/board/npcx7_evb/board.c
@@ -109,7 +109,7 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 40,
.debounce_down_us = 6 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/npcx7_evb/board.h b/board/npcx7_evb/board.h
index 3b75680eb3..4bad61b152 100644
--- a/board/npcx7_evb/board.h
+++ b/board/npcx7_evb/board.h
@@ -37,7 +37,7 @@
#define CONFIG_BOARD_VERSION_GPIO
#define CONFIG_EXTPOWER_GPIO
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#undef CONFIG_LOW_POWER_IDLE /* Deep Sleep Support */
#define CONFIG_POWER_BUTTON
diff --git a/board/npcx9_evb/board.c b/board/npcx9_evb/board.c
index 2a7b1e2945..876ca7bd10 100644
--- a/board/npcx9_evb/board.c
+++ b/board/npcx9_evb/board.c
@@ -123,7 +123,7 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 40,
.debounce_down_us = 6 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/npcx9_evb/board.h b/board/npcx9_evb/board.h
index 345f601e91..e7e1190480 100644
--- a/board/npcx9_evb/board.h
+++ b/board/npcx9_evb/board.h
@@ -23,7 +23,7 @@
#define CONFIG_EXTPOWER_GPIO
#define CONFIG_HIBERNATE_PSL_COMPENSATE_RTC
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#undef CONFIG_LOW_POWER_IDLE /* Deep Sleep Support */
#define CONFIG_POWER_BUTTON
diff --git a/board/npcx_evb/board.c b/board/npcx_evb/board.c
index cee9acfeef..c86f35f487 100644
--- a/board/npcx_evb/board.c
+++ b/board/npcx_evb/board.c
@@ -126,7 +126,7 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 40,
.debounce_down_us = 6 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/npcx_evb/board.h b/board/npcx_evb/board.h
index b97bf43047..fc12b6d80a 100644
--- a/board/npcx_evb/board.h
+++ b/board/npcx_evb/board.h
@@ -24,7 +24,7 @@
#define CONFIG_SPI_FLASH_W25Q64
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_POWER_BUTTON
#define CONFIG_VBOOT_HASH
diff --git a/board/npcx_evb_arm/board.c b/board/npcx_evb_arm/board.c
index f99ab2e0f6..8c4f9c7668 100644
--- a/board/npcx_evb_arm/board.c
+++ b/board/npcx_evb_arm/board.c
@@ -97,7 +97,7 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 40,
.debounce_down_us = 6 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/npcx_evb_arm/board.h b/board/npcx_evb_arm/board.h
index 582807a1b2..3598457a5e 100644
--- a/board/npcx_evb_arm/board.h
+++ b/board/npcx_evb_arm/board.h
@@ -20,7 +20,7 @@
#define CONFIG_SPI_FLASH_W25Q64
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_MKBP /* Instead of 8042 protocol of keyboard */
#define CONFIG_MKBP_USE_GPIO
#define CONFIG_POWER_BUTTON
diff --git a/board/pazquel/board.c b/board/pazquel/board.c
index 7406d8cc2e..edcc8e008b 100644
--- a/board/pazquel/board.c
+++ b/board/pazquel/board.c
@@ -118,7 +118,7 @@ static void board_connect_c0_sbu(enum gpio_signal s)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/pazquel/board.h b/board/pazquel/board.h
index 08a8f161f1..121158f231 100644
--- a/board/pazquel/board.h
+++ b/board/pazquel/board.h
@@ -23,7 +23,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* BC 1.2 Charger */
diff --git a/board/pirika/board.c b/board/pirika/board.c
index 0c754b2f4a..f780931107 100644
--- a/board/pirika/board.c
+++ b/board/pirika/board.c
@@ -49,7 +49,7 @@ static void check_c0_line(void);
DECLARE_DEFERRED(check_c0_line);
/* Use default keyboard scan config, because board didn't supply one */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* CONFIG_KEYBOARD_COL2_INVERTED is defined for passing the column 2
* to H1 which inverts the signal. The signal passing through H1
diff --git a/board/pirika/board.h b/board/pirika/board.h
index 0330449c17..db119d5191 100644
--- a/board/pirika/board.h
+++ b/board/pirika/board.h
@@ -90,7 +90,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_VIVALDI
#define CONFIG_KEYBOARD_REFRESH_ROW3
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#ifndef __ASSEMBLER__
diff --git a/board/pompom/board.c b/board/pompom/board.c
index c4e4f02a63..ae9af4e596 100644
--- a/board/pompom/board.c
+++ b/board/pompom/board.c
@@ -107,7 +107,7 @@ static void board_connect_c0_sbu(enum gpio_signal s)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/pompom/board.h b/board/pompom/board.h
index c8c9476b25..3f35d7ceab 100644
--- a/board/pompom/board.h
+++ b/board/pompom/board.h
@@ -16,7 +16,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_REFRESH_ROW3
#define CONFIG_PWM_KBLIGHT
diff --git a/board/primus/keyboard.c b/board/primus/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/primus/keyboard.c
+++ b/board/primus/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/redrix/keyboard.c b/board/redrix/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/redrix/keyboard.c
+++ b/board/redrix/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/reef/board.c b/board/reef/board.c
index de0e093860..26e70fa52b 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -913,7 +913,7 @@ int board_get_version(void)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/reef/board.h b/board/reef/board.h
index 3afcc77907..cc599ce1ba 100644
--- a/board/reef/board.h
+++ b/board/reef/board.h
@@ -120,7 +120,7 @@
#define CONFIG_HOSTCMD_FLASH_SPI_INFO
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/board/reef_it8320/board.c b/board/reef_it8320/board.c
index cdcd88b910..43170dd04d 100644
--- a/board/reef_it8320/board.c
+++ b/board/reef_it8320/board.c
@@ -472,7 +472,7 @@ int board_get_version(void)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/reef_it8320/board.h b/board/reef_it8320/board.h
index 20d18ae3bf..510aff4792 100644
--- a/board/reef_it8320/board.h
+++ b/board/reef_it8320/board.h
@@ -116,7 +116,7 @@
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
#define CONFIG_IT83XX_VCC_3P3V
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_LED_COMMON
diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c
index b308b10b65..d8e0d22fac 100644
--- a/board/reef_mchp/board.c
+++ b/board/reef_mchp/board.c
@@ -1153,7 +1153,7 @@ int board_get_version(void)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/reef_mchp/board.h b/board/reef_mchp/board.h
index b12c4e5d71..c9b2704530 100644
--- a/board/reef_mchp/board.h
+++ b/board/reef_mchp/board.h
@@ -122,7 +122,7 @@
#define CONFIG_HOSTCMD_FLASH_SPI_INFO
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
diff --git a/board/samus/board.c b/board/samus/board.c
index 211d000e86..0a25107960 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -223,7 +223,7 @@ struct ec_thermal_config thermal_params[] = {
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
.output_settle_us = 40,
.debounce_down_us = 6 * MSEC,
.debounce_up_us = 30 * MSEC,
diff --git a/board/samus/board.h b/board/samus/board.h
index dc72ea9944..ed79e9876f 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -30,7 +30,7 @@
#define CONFIG_CHIPSET_CAN_THROTTLE
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_SCANCODE_CALLBACK
diff --git a/board/stern/board.c b/board/stern/board.c
index 5963d53ab4..7b92262c93 100644
--- a/board/stern/board.c
+++ b/board/stern/board.c
@@ -88,7 +88,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/board/taeko/keyboard.c b/board/taeko/keyboard.c
index b2f1c9f10c..a9f033130d 100644
--- a/board/taeko/keyboard.c
+++ b/board/taeko/keyboard.c
@@ -9,7 +9,7 @@
#include "timer.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/terrador/board.c b/board/terrador/board.c
index 7fc4694048..e13b376c3f 100644
--- a/board/terrador/board.c
+++ b/board/terrador/board.c
@@ -47,7 +47,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/todor/board.c b/board/todor/board.c
index 466aa58b68..06c030dea6 100644
--- a/board/todor/board.c
+++ b/board/todor/board.c
@@ -47,7 +47,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/trogdor/board.c b/board/trogdor/board.c
index 0d7eccdc57..a9b72a560d 100644
--- a/board/trogdor/board.c
+++ b/board/trogdor/board.c
@@ -32,7 +32,7 @@
#include "gpio_list.h"
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/* Use 80 us, because KSO_02 passes through the H1. */
.output_settle_us = 80,
/*
diff --git a/board/trogdor/board.h b/board/trogdor/board.h
index 16bc508b2d..346b135ea4 100644
--- a/board/trogdor/board.h
+++ b/board/trogdor/board.h
@@ -23,7 +23,7 @@
/* Keyboard */
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_PWM_KBLIGHT
/* Battery */
diff --git a/board/trondo/board.c b/board/trondo/board.c
index 6a4ba84c51..d6e68b35a7 100644
--- a/board/trondo/board.c
+++ b/board/trondo/board.c
@@ -48,7 +48,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/voema/board.c b/board/voema/board.c
index 876f8c9ef7..91dd9f144a 100644
--- a/board/voema/board.c
+++ b/board/voema/board.c
@@ -45,7 +45,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/volet/board.c b/board/volet/board.c
index 716c4c5481..603536fd68 100644
--- a/board/volet/board.c
+++ b/board/volet/board.c
@@ -90,7 +90,7 @@ __override const struct ec_response_keybd_config
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
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 */
- },
-};
diff --git a/board/voxel/board.c b/board/voxel/board.c
index b5715969b4..2c7f7feac5 100644
--- a/board/voxel/board.c
+++ b/board/voxel/board.c
@@ -91,7 +91,7 @@ const struct ec_response_keybd_config *board_vivaldi_keybd_config(void)
}
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__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. */
diff --git a/board/waddledoo2/board.c b/board/waddledoo2/board.c
index c0e5e9013e..6cd66a2b97 100644
--- a/board/waddledoo2/board.c
+++ b/board/waddledoo2/board.c
@@ -72,7 +72,7 @@ const int usb_port_enable[USB_PORT_COUNT] = {
};
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override 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
diff --git a/board/waddledoo2/board.h b/board/waddledoo2/board.h
index c4ded0559e..aefad9b213 100644
--- a/board/waddledoo2/board.h
+++ b/board/waddledoo2/board.h
@@ -35,7 +35,7 @@
#define GPIO_USB_C1_INT_ODL GPIO_SUB_USB_C1_INT_ODL
/* Keyboard */
-#define CONFIG_KEYBOARD_BOARD_CONFIG
+
#define CONFIG_KEYBOARD_KEYPAD
#define CONFIG_PWM_KBLIGHT
diff --git a/board/willow/board.c b/board/willow/board.c
index fbdc4e10bd..6d036a1526 100644
--- a/board/willow/board.c
+++ b/board/willow/board.c
@@ -85,7 +85,7 @@ const struct power_signal_info power_signal_list[] = {
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
/* Keyboard scan setting */
-struct keyboard_scan_config keyscan_config = {
+__override struct keyboard_scan_config keyscan_config = {
/*
* TODO(b/133200075): Tune this once we have the final performance
* out of the driver and the i2c bus.
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 3349566b55..3e7e1c1d87 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -53,9 +53,7 @@
#define CONFIG_KEYBOARD_POST_SCAN_CLOCKS 16000
#endif
-#ifndef CONFIG_KEYBOARD_BOARD_CONFIG
-/* Use default keyboard scan config, because board didn't supply one */
-struct keyboard_scan_config keyscan_config = {
+__overridable struct keyboard_scan_config keyscan_config = {
#ifdef CONFIG_KEYBOARD_COL2_INVERTED
/*
* CONFIG_KEYBOARD_COL2_INVERTED is defined for passing the column 2
@@ -78,7 +76,6 @@ struct keyboard_scan_config keyscan_config = {
0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
},
};
-#endif
/* Boot key list. Must be in same order as enum boot_key. */
struct boot_key_entry {
diff --git a/docs/configuration/keyboard.md b/docs/configuration/keyboard.md
index c04e8eddbd..8398fefbde 100644
--- a/docs/configuration/keyboard.md
+++ b/docs/configuration/keyboard.md
@@ -42,8 +42,8 @@ macros.
## Data structures
-- `struct keyboard_scan_config keyscan_config` - This must be defined if the
- `CONFIG_KEYBOARD_BOARD_CONFIG` option is defined.
+- `struct keyboard_scan_config keyscan_config` - This can be used to customize
+ the keyboard scanner (e.g. scan frequency, debounce duration, etc.).
## Tasks
diff --git a/include/config.h b/include/config.h
index 3136dd18fe..d16a4a0388 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2718,12 +2718,6 @@
#undef CONFIG_KEYBOARD_FACTORY_TEST
/*
- * 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
-
-/*
* Support for boot key combinations (e.g. refresh key being held on boot to
* trigger recovery).
*/
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h
index e74bfcea33..46215da218 100644
--- a/include/keyboard_scan.h
+++ b/include/keyboard_scan.h
@@ -46,7 +46,7 @@ struct keyboard_scan_config *keyboard_scan_get_config(void);
/*
* Which is probably this.
*/
-extern struct keyboard_scan_config keyscan_config;
+__override_proto extern struct keyboard_scan_config keyscan_config;
/* Key held down at keyboard-controlled reset boot time. */
enum boot_key {
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
index 14514427dc..fc303c737d 100644
--- a/zephyr/Kconfig.keyboard
+++ b/zephyr/Kconfig.keyboard
@@ -48,16 +48,6 @@ config PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP
endchoice # PLATFORM_EC_KEYBOARD
-config PLATFORM_EC_KEYBOARD_BOARD_CONFIG
- bool "Use custom keyboard config"
- help
- Enable support for custom keyboard config. in which case
- keyscan_config must be defined by the board, using
- struct keyboard_scan_config.
-
- If this is not enabled, default values in common/keyboard_scan.c are
- used.
-
config PLATFORM_EC_KEYBOARD_KEYPAD
bool "Support a numeric keypad"
help
diff --git a/zephyr/projects/volteer/volteer/CMakeLists.txt b/zephyr/projects/volteer/volteer/CMakeLists.txt
index fddf517597..c749cfc340 100644
--- a/zephyr/projects/volteer/volteer/CMakeLists.txt
+++ b/zephyr/projects/volteer/volteer/CMakeLists.txt
@@ -39,8 +39,6 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_BATTERY
"${PLATFORM_EC_BOARD}/battery.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_CBI_EEPROM
"${PLATFORM_EC_BOARD}/cbi.c")
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_BOARD_CONFIG
- "${PLATFORM_EC_BOARD}/keyboard.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_LED_COMMON
"${PLATFORM_EC_BOARD}/led.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC
diff --git a/zephyr/projects/volteer/volteer/prj.conf b/zephyr/projects/volteer/volteer/prj.conf
index 2a0cd5cc44..ac39a72846 100644
--- a/zephyr/projects/volteer/volteer/prj.conf
+++ b/zephyr/projects/volteer/volteer/prj.conf
@@ -29,7 +29,6 @@ CONFIG_PLATFORM_EC_CONSOLE_CMD_CHGRAMP=n
# Keyboard
CONFIG_PLATFORM_EC_KEYBOARD=y
CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED=y
-CONFIG_PLATFORM_EC_KEYBOARD_BOARD_CONFIG=y
CONFIG_PLATFORM_EC_KEYBOARD_KEYPAD=y
CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI2=y
CONFIG_PLATFORM_EC_VOLUME_BUTTONS=y
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index a7346e6c8a..01ab43d779 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -469,11 +469,6 @@
#define CONFIG_KEYBOARD_COL2_INVERTED
#endif /* CONFIG_PLATFORM_EC_KEYBOARD_COL2_INVERTED */
-#undef CONFIG_KEYBOARD_BOARD_CONFIG
-#ifdef CONFIG_PLATFORM_EC_KEYBOARD_BOARD_CONFIG
-#define CONFIG_KEYBOARD_BOARD_CONFIG
-#endif
-
#undef CONFIG_KEYBOARD_KEYPAD
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_KEYPAD
#define CONFIG_KEYBOARD_KEYPAD