diff options
author | Rob Barnes <robbarnes@google.com> | 2021-07-26 12:32:36 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-28 21:01:58 +0000 |
commit | cd6bad248528abf30475ab1026b8ba9bdcb42fec (patch) | |
tree | 3cb3dd3236300bd2de4552b534cbd288e1297d7a | |
parent | 05bbe21729b951b9cfc5462ee35cbb28f670f4a6 (diff) | |
download | chrome-ec-cd6bad248528abf30475ab1026b8ba9bdcb42fec.tar.gz |
keyboard_scan: Add consts needed for factory test to header
Add keyboard_factory_scan_pins and keyboard_factory_scan_pins_used to
keyboard_scan header so they do not need to be declared as extern by
individual boards. These constants need to be defined if
CONFIG_KEYBOARD_FACTORY_TEST is enabled.
BUG=None
TEST=Build
BRANCH=None
Change-Id: I1a100f626b3cea251ca72703d17b2d27db0f8f28
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3053101
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | board/aleena/board.h | 5 | ||||
-rw-r--r-- | board/berknip/board.h | 5 | ||||
-rw-r--r-- | board/bloog/board.h | 5 | ||||
-rw-r--r-- | board/bobba/board.h | 2 | ||||
-rw-r--r-- | board/careena/board.h | 5 | ||||
-rw-r--r-- | board/chronicler/board.h | 5 | ||||
-rw-r--r-- | board/dirinboz/board.h | 5 | ||||
-rw-r--r-- | board/dood/board.h | 2 | ||||
-rw-r--r-- | board/dratini/board.h | 5 | ||||
-rw-r--r-- | board/drawcia/board.h | 5 | ||||
-rw-r--r-- | board/elemi/board.h | 5 | ||||
-rw-r--r-- | board/ezkinil/board.h | 2 | ||||
-rw-r--r-- | board/garg/board.h | 2 | ||||
-rw-r--r-- | board/gumboz/board.h | 5 | ||||
-rw-r--r-- | board/haboki/board.h | 5 | ||||
-rw-r--r-- | board/icarus/board.h | 2 | ||||
-rw-r--r-- | board/jinlon/board.h | 5 | ||||
-rw-r--r-- | board/kindred/board.h | 2 | ||||
-rw-r--r-- | board/kracko/board.h | 6 | ||||
-rw-r--r-- | board/lantis/board.h | 5 | ||||
-rw-r--r-- | board/lazor/board.h | 2 | ||||
-rw-r--r-- | board/magolor/board.h | 3 | ||||
-rw-r--r-- | board/meep/board.h | 5 | ||||
-rw-r--r-- | board/morphius/board.h | 5 | ||||
-rw-r--r-- | board/nami/board.h | 2 | ||||
-rw-r--r-- | board/voema/board.h | 3 | ||||
-rw-r--r-- | board/volet/board.h | 3 | ||||
-rw-r--r-- | board/voxel/board.h | 3 | ||||
-rw-r--r-- | include/keyboard_scan.h | 10 |
29 files changed, 10 insertions, 109 deletions
diff --git a/board/aleena/board.h b/board/aleena/board.h index e0fd8da555..9ad2a8b94b 100644 --- a/board/aleena/board.h +++ b/board/aleena/board.h @@ -71,11 +71,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - void motion_interrupt(enum gpio_signal signal); #endif /* !__ASSEMBLER__ */ diff --git a/board/berknip/board.h b/board/berknip/board.h index 368084fa25..5ef9e33f0c 100644 --- a/board/berknip/board.h +++ b/board/berknip/board.h @@ -199,11 +199,6 @@ extern const struct usb_mux usbc1_tusb544; extern const struct usb_mux usbc1_ps8743; extern struct usb_mux usbc1_amd_fp5_usb_mux; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/bloog/board.h b/board/bloog/board.h index 458e7c7e4d..466c38aede 100644 --- a/board/bloog/board.h +++ b/board/bloog/board.h @@ -98,11 +98,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - int board_is_convertible(void); #endif /* !__ASSEMBLER__ */ diff --git a/board/bobba/board.h b/board/bobba/board.h index 31b9499b9d..23f73e7dbc 100644 --- a/board/bobba/board.h +++ b/board/bobba/board.h @@ -87,8 +87,6 @@ /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; #include "gpio_signal.h" #include "registers.h" diff --git a/board/careena/board.h b/board/careena/board.h index b37567001c..75545cfcaa 100644 --- a/board/careena/board.h +++ b/board/careena/board.h @@ -58,11 +58,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/chronicler/board.h b/board/chronicler/board.h index 20670bd6e9..1d12b5058d 100644 --- a/board/chronicler/board.h +++ b/board/chronicler/board.h @@ -157,11 +157,6 @@ enum pwm_channel { void board_reset_pd_mcu(void); -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/dirinboz/board.h b/board/dirinboz/board.h index ac6f69fc70..049d7884c8 100644 --- a/board/dirinboz/board.h +++ b/board/dirinboz/board.h @@ -175,11 +175,6 @@ void tcpc_alert_event(enum gpio_signal signal); void bc12_interrupt(enum gpio_signal signal); void ppc_interrupt(enum gpio_signal signal); -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/dood/board.h b/board/dood/board.h index 530e2a0bf2..dcb5c93005 100644 --- a/board/dood/board.h +++ b/board/dood/board.h @@ -64,8 +64,6 @@ /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; #include "gpio_signal.h" #include "registers.h" diff --git a/board/dratini/board.h b/board/dratini/board.h index 5878f17af1..e75865e376 100644 --- a/board/dratini/board.h +++ b/board/dratini/board.h @@ -175,11 +175,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - bool board_is_convertible(void); void ccd_mode_isr(enum gpio_signal signal); diff --git a/board/drawcia/board.h b/board/drawcia/board.h index 55adab5106..96e6b3f14d 100644 --- a/board/drawcia/board.h +++ b/board/drawcia/board.h @@ -147,11 +147,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/elemi/board.h b/board/elemi/board.h index cca3f1eaa0..f2ce54e83a 100644 --- a/board/elemi/board.h +++ b/board/elemi/board.h @@ -151,11 +151,6 @@ enum usbc_port { void board_reset_pd_mcu(void); -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/ezkinil/board.h b/board/ezkinil/board.h index 23d79e0361..b823ded45a 100644 --- a/board/ezkinil/board.h +++ b/board/ezkinil/board.h @@ -203,8 +203,6 @@ static inline bool ec_config_has_hdmi_conn_hpd(void) ? GPIO_DP1_HPD \ : GPIO_DP2_HPD) -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; extern const struct usb_mux usbc1_tusb544; extern const struct usb_mux usbc1_ps8743; extern struct usb_mux usbc1_amd_fp5_usb_mux; diff --git a/board/garg/board.h b/board/garg/board.h index 6837e992b2..57bd10e007 100644 --- a/board/garg/board.h +++ b/board/garg/board.h @@ -60,8 +60,6 @@ /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; #include "gpio_signal.h" #include "registers.h" diff --git a/board/gumboz/board.h b/board/gumboz/board.h index 7375965bb1..e1ba89d63e 100644 --- a/board/gumboz/board.h +++ b/board/gumboz/board.h @@ -180,11 +180,6 @@ void tcpc_alert_event(enum gpio_signal signal); void bc12_interrupt(enum gpio_signal signal); void ppc_interrupt(enum gpio_signal signal); -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/haboki/board.h b/board/haboki/board.h index 6161151a93..2f42b616e0 100644 --- a/board/haboki/board.h +++ b/board/haboki/board.h @@ -146,11 +146,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/icarus/board.h b/board/icarus/board.h index e70fc7113d..b9232d65a5 100644 --- a/board/icarus/board.h +++ b/board/icarus/board.h @@ -115,8 +115,6 @@ enum battery_type { /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST #define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; #ifdef SECTION_IS_RO /* Interrupt handler for AP jump to BL */ diff --git a/board/jinlon/board.h b/board/jinlon/board.h index ada665098e..beb30c8e12 100644 --- a/board/jinlon/board.h +++ b/board/jinlon/board.h @@ -183,11 +183,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/kindred/board.h b/board/kindred/board.h index 99bdce09a9..79fc7c0642 100644 --- a/board/kindred/board.h +++ b/board/kindred/board.h @@ -179,8 +179,6 @@ enum battery_type { /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; void motion_interrupt(enum gpio_signal signal); void ccd_mode_isr(enum gpio_signal signal); diff --git a/board/kracko/board.h b/board/kracko/board.h index e3443e1afc..ce26c90b70 100644 --- a/board/kracko/board.h +++ b/board/kracko/board.h @@ -143,12 +143,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; - -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/lantis/board.h b/board/lantis/board.h index 31627fc5ce..df209187ac 100644 --- a/board/lantis/board.h +++ b/board/lantis/board.h @@ -139,11 +139,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/lazor/board.h b/board/lazor/board.h index 406ed578fd..77198f69ee 100644 --- a/board/lazor/board.h +++ b/board/lazor/board.h @@ -118,8 +118,6 @@ enum battery_type { /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; /* Reset all TCPCs. */ void board_reset_pd_mcu(void); diff --git a/board/magolor/board.h b/board/magolor/board.h index c1f8ce3206..c1ef73cc64 100644 --- a/board/magolor/board.h +++ b/board/magolor/board.h @@ -207,9 +207,6 @@ enum battery_type { BATTERY_TYPE_COUNT, }; -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; - void motion_interrupt(enum gpio_signal signal); #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/meep/board.h b/board/meep/board.h index 10fecc874b..013237e2d7 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -113,11 +113,6 @@ enum ppc_type { PPC_TYPE_COUNT, }; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - int board_is_convertible(void); #endif /* !__ASSEMBLER__ */ diff --git a/board/morphius/board.h b/board/morphius/board.h index 45fae888aa..603bcec69b 100644 --- a/board/morphius/board.h +++ b/board/morphius/board.h @@ -217,11 +217,6 @@ extern const struct usb_mux usbc1_ps8802; extern const struct usb_mux usbc1_ps8818; extern struct usb_mux usbc1_amd_fp5_usb_mux; -#ifdef CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; -#endif - #endif /* !__ASSEMBLER__ */ diff --git a/board/nami/board.h b/board/nami/board.h index c9f6c34d82..6d340af1df 100644 --- a/board/nami/board.h +++ b/board/nami/board.h @@ -214,8 +214,6 @@ /* support factory keyboard test */ #define CONFIG_KEYBOARD_FACTORY_TEST -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; #include "gpio_signal.h" #include "registers.h" diff --git a/board/voema/board.h b/board/voema/board.h index 30292c623e..737f6c1d7b 100644 --- a/board/voema/board.h +++ b/board/voema/board.h @@ -184,9 +184,6 @@ enum usbc_port { void board_reset_pd_mcu(void); -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/volet/board.h b/board/volet/board.h index bf755f5212..09e30337c1 100644 --- a/board/volet/board.h +++ b/board/volet/board.h @@ -195,9 +195,6 @@ void board_reset_pd_mcu(void); void motion_interrupt(enum gpio_signal signal); -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/board/voxel/board.h b/board/voxel/board.h index 54369a9ac8..b02716088e 100644 --- a/board/voxel/board.h +++ b/board/voxel/board.h @@ -195,9 +195,6 @@ void board_reset_pd_mcu(void); void motion_interrupt(enum gpio_signal signal); -extern const int keyboard_factory_scan_pins[][2]; -extern const int keyboard_factory_scan_pins_used; - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h index 46215da218..b3a7bed587 100644 --- a/include/keyboard_scan.h +++ b/include/keyboard_scan.h @@ -135,4 +135,14 @@ void set_vol_up_key(uint8_t row, uint8_t col); static inline void set_vol_up_key(uint8_t row, uint8_t col) {} #endif +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +/* + * Map keyboard connector pins to EC GPIO pins for factory test. + * Pins mapped to {-1, -1} are skipped. + */ +extern const int keyboard_factory_scan_pins[][2]; +extern const int keyboard_factory_scan_pins_used; +#endif + + #endif /* __CROS_EC_KEYBOARD_SCAN_H */ |