diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-05-30 20:56:21 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-05-30 20:59:59 +0000 |
commit | 288cae699bdd4437caa583c85dd925678e2d43c8 (patch) | |
tree | c88d61213651cf55b7e4ae89c3f3849bf39da89f /chip | |
parent | aad3f858a436bc6c763d4ddf8a49fad6465302da (diff) | |
download | chrome-ec-288cae699bdd4437caa583c85dd925678e2d43c8.tar.gz |
stm32: use level interrupt instead of edge
Using low level trigger interrupt rather than falling edge is more
robust since we avoid detecting glitches or missing interrupts.
This is backward compatible with the AP software expecting falling edge.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8869
TEST=On Daisy, check we can still enter text in U-Boot console and
Chrome browser (and check interrupt count increase as expected).
Change-Id: Ide2b27f9129173530d137b5d70d998ebd8f8e669
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/keyboard_scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index 3a302969e0..b8051539d5 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -307,7 +307,7 @@ static int check_keys_changed(void) CPUTS("]\n"); if (kb_fifo_add(raw_state) == EC_SUCCESS) - board_interrupt_host(); + board_interrupt_host(1); else CPRINTF("dropped keystroke\n"); } @@ -383,6 +383,8 @@ int keyboard_scan_recovery_pressed(void) static int keyboard_get_scan(uint8_t *data, int *resp_size) { kb_fifo_remove(data); + if (!kb_fifo_entries) + board_interrupt_host(0); *resp_size = KB_OUTPUTS; return EC_RES_SUCCESS; |