diff options
author | Devin Lu <devin.lu@quantatw.com> | 2018-06-26 09:15:11 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-19 02:52:05 -0700 |
commit | 97df79fcb02f046c12768497946a7eb8d6b4cffe (patch) | |
tree | df99a901c4545594adef474c918791ac48cd96a5 | |
parent | 4a2e6c78ef3b4578cf706c8d6bf73b7f6b7f07a6 (diff) | |
download | chrome-ec-97df79fcb02f046c12768497946a7eb8d6b4cffe.tar.gz |
careena: enable keyboard factory scanning
This patch is referring to CL:332322.
BUG=none
BRANCH=none
TEST=Short keyboard pins and make sure "ectool kbfactorytest" works.
Change-Id: Ic943753c8cec8dde79842de48e5d21ff4dc01c00
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/1114400
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/careena/board.c | 18 | ||||
-rw-r--r-- | board/careena/board.h | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/board/careena/board.c b/board/careena/board.c index 79ad52c827..afa9c18637 100644 --- a/board/careena/board.c +++ b/board/careena/board.c @@ -239,3 +239,21 @@ void board_reset_pd_mcu(void) msleep(ANX74XX_PWR_L_PWR_H_DELAY_MS); board_set_tcpc_power_mode(USB_PD_PORT_ANX74XX, 1); } + +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +/* + * We have total 24 pins for keyboard connecter, {-1, -1} mean + * the N/A pin that don't consider it and reserve index 0 area + * that we don't have pin 0. + */ +const int keyboard_factory_scan_pins[][2] = { + {-1, -1}, {0, 5}, {1, 1}, {1, 0}, {0, 6}, + {0, 7}, {1, 4}, {1, 3}, {1, 6}, {-1, -1}, + {3, 1}, {2, 0}, {1, 5}, {2, 6}, {-1, -1}, + {2, 1}, {2, 4}, {2, 5}, {1, 2}, {2, 3}, + {2, 2}, {3, 0}, {-1, -1}, {-1, -1}, {-1, -1}, +}; + +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); +#endif diff --git a/board/careena/board.h b/board/careena/board.h index 311c7ac784..e86f97c07e 100644 --- a/board/careena/board.h +++ b/board/careena/board.h @@ -22,6 +22,7 @@ #define CONFIG_LED_COMMON #define CONFIG_CMD_LEDTEST +#define CONFIG_KEYBOARD_FACTORY_TEST #ifndef __ASSEMBLER__ @@ -38,6 +39,11 @@ 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 */ |