diff options
Diffstat (limited to 'zephyr/program/nissa/yaviks/src/keyboard.c')
-rw-r--r-- | zephyr/program/nissa/yaviks/src/keyboard.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/program/nissa/yaviks/src/keyboard.c b/zephyr/program/nissa/yaviks/src/keyboard.c index 54f8750e98..22fa2df996 100644 --- a/zephyr/program/nissa/yaviks/src/keyboard.c +++ b/zephyr/program/nissa/yaviks/src/keyboard.c @@ -4,6 +4,7 @@ */ #include "cros_cbi.h" #include "ec_commands.h" +#include "gpio_it8xxx2.h" #include "hooks.h" #include "keyboard_8042_sharedlib.h" #include "keyboard_scan.h" @@ -104,3 +105,21 @@ static void kb_layout_init(void) set_scancode_set2(4, 0, get_scancode_set2(2, 7)); } DECLARE_HOOK(HOOK_INIT, kb_layout_init, HOOK_PRIO_POST_FIRST); + +/* + * Map keyboard connector pins to EC GPIO pins for factory test. + * Pins mapped to {-1, -1} are skipped. + * The connector has 30 pins total, and there is no pin 0. + */ +const int keyboard_factory_scan_pins[][2] = { + { -1, -1 }, { GPIO_KSOH, 4 }, { GPIO_KSOH, 0 }, { GPIO_KSOH, 1 }, + { GPIO_KSOH, 3 }, { GPIO_KSOH, 2 }, { -1, -1 }, { -1, -1 }, + { GPIO_KSOL, 5 }, { GPIO_KSOL, 6 }, { -1, -1 }, { GPIO_KSOL, 3 }, + { GPIO_KSOL, 2 }, { GPIO_KSI, 0 }, { GPIO_KSOL, 1 }, { GPIO_KSOL, 4 }, + { GPIO_KSI, 3 }, { GPIO_KSI, 2 }, { GPIO_KSOL, 0 }, { GPIO_KSI, 5 }, + { GPIO_KSI, 4 }, { GPIO_KSOL, 7 }, { GPIO_KSI, 6 }, { GPIO_KSI, 7 }, + { GPIO_KSI, 1 }, { -1, -1 }, { GPIO_KSOH, 5 }, { -1, -1 }, + { GPIO_KSOH, 6 }, { -1, -1 }, { -1, -1 }, +}; +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); |