diff options
author | Devin Lu <devin.lu@quantatw.com> | 2018-12-12 13:28:31 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-17 20:47:01 -0800 |
commit | 2577c1cddd38b7c0c04cb57f6941b10c205b99e7 (patch) | |
tree | f8a1a51a2ad520eb3f9b87235ff72bb1a483743f /chip/mchp | |
parent | c1b19edff6875060b8679c7579f76fd4b2cd2421 (diff) | |
download | chrome-ec-2577c1cddd38b7c0c04cb57f6941b10c205b99e7.tar.gz |
keyboard: restore KBD_KSO2 after keyboard factory scan testing
This patch fix the keyboard malfucntion with KBD_KSO2 line after
executed "ectool kbfactorytest".
BUG=none
BRANCH=octopus
TEST=make sure keyboard works after executed "ectool kbfactorytest"
on meep.
Change-Id: I33c22e59a01884ff6c961161e189583a6c3673a3
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/1373389
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/mchp')
-rw-r--r-- | chip/mchp/keyboard_raw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/mchp/keyboard_raw.c b/chip/mchp/keyboard_raw.c index e1a9aa60cc..4d146e85f8 100644 --- a/chip/mchp/keyboard_raw.c +++ b/chip/mchp/keyboard_raw.c @@ -103,13 +103,15 @@ DECLARE_IRQ(MCHP_IRQ_KSC_INT, keyboard_raw_interrupt, 1); /* Run keyboard factory testing, scan out KSO/KSI if any shorted. */ int keyboard_factory_test_scan(void) { - int i, j; + int i, j, flags; uint16_t shorted = 0; uint32_t port, id, val; /* Disable keyboard scan while testing */ keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_CLOSED); + flags = gpio_get_default_flags(GPIO_KBD_KSO2); + /* Set all of KSO/KSI pins to internal pull-up and input */ for (i = 0; i < keyboard_factory_scan_pins_used; i++) { @@ -160,6 +162,7 @@ int keyboard_factory_test_scan(void) } done: gpio_config_module(MODULE_KEYBOARD_SCAN, 1); + gpio_set_flags(GPIO_KBD_KSO2, flags); keyboard_scan_enable(1, KB_SCAN_DISABLE_LID_CLOSED); return shorted; |