diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2012-04-30 17:55:42 +0800 |
---|---|---|
committer | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2012-05-24 13:32:35 +0800 |
commit | 29d25d807c18330c1426425e8c53af1067be7640 (patch) | |
tree | 3a5c5538b97e74433d6ab6ea189180f696ce5289 /include | |
parent | eb7765c0c41986e225506447de0d9f722c66e32b (diff) | |
download | chrome-ec-29d25d807c18330c1426425e8c53af1067be7640.tar.gz |
Keyboard scan must stop driving columns when power button is pressed.
Tristage all columns as soon as possible right after the power button is
pressed. This can avoid the silego chip to reset the EC.
Resume the interrupt mode after power button is released so that the
deasserted columns doesn't trigger EC reset.
Also change some function names for export.
BUG=chrome-os-partner:7486
TEST=
press g first, then power button. repeat many times. system is not rebooted.
press power button first, then g. repeat many times. system is not rebooted.
ESC+power is still reseting system.
The long press power button still shutdowns system.
Change-Id: Ie5dec20ec3d3c4ffbd4acf5a4dd7f63eec38af56
Diffstat (limited to 'include')
-rw-r--r-- | include/i8042.h | 2 | ||||
-rw-r--r-- | include/keyboard.h | 3 | ||||
-rw-r--r-- | include/keyboard_scan.h | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/include/i8042.h b/include/i8042.h index c3d858bee1..d88e3acb1f 100644 --- a/include/i8042.h +++ b/include/i8042.h @@ -90,7 +90,7 @@ #define I8042_ENIRQ1 (1 << 0) -void i8042_init(void); +void i8042_flush_buffer(void); /* common/i8042.c implements this function, which is called by lpc.c diff --git a/include/keyboard.h b/include/keyboard.h index 78884c1053..775135f1b7 100644 --- a/include/keyboard.h +++ b/include/keyboard.h @@ -53,6 +53,9 @@ void kblog_put(char type, uint8_t byte); #define MAX_KEYBOARD_MATRIX_ROWS 8 #define MAX_KEYBOARD_MATRIX_COLS 16 +/* Clear the keyboard buffer to host. */ +void keyboard_clear_underlying_buffer(void); + /* Asks the underlayer EC lib what keys are pressed right now. * * Sets bit_array to a debounced array of which keys are currently pressed, diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h index 684885c82a..67e09e0312 100644 --- a/include/keyboard_scan.h +++ b/include/keyboard_scan.h @@ -19,4 +19,9 @@ int keyboard_scan_recovery_pressed(void); /* clear any saved keyboard state (empty FIFO, etc) */ void keyboard_clear_state(void); + +/* Enables/disables keyboard matrix scan. */ +void keyboard_enable_scanning(int enable); + + #endif /* __CROS_KEYBOARD_SCAN_H */ |