summaryrefslogtreecommitdiff
path: root/chip/lm4/keyboard_scan.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-03-16 15:43:34 -0700
committerRandall Spangler <rspangler@chromium.org>2012-03-19 09:04:56 -0700
commit2a9f80d2d990816fe1e5bb1222a6b294673ce7b2 (patch)
treed0c6f16db3b667379b598ae5b733c69a6e2ebe68 /chip/lm4/keyboard_scan.c
parenteb3920ec7a6a5e3e28529fd51a6c63cb6e7509e4 (diff)
downloadchrome-ec-2a9f80d2d990816fe1e5bb1222a6b294673ce7b2.tar.gz
More cleanup of board/chip configs and initialization
More modules can be disabled individually through CONFIG_ defines. Reordered early module pre-init and init, and added comments to explain why things are ordered in main() the way they are. Fixed a few assorted init-related bugs along the way, like st32m keyboard scan double-initializing. BUG=none TEST=build link, bds, daisy Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: I04a7fa51d743adfab4be4bdddaeef68943b96dec
Diffstat (limited to 'chip/lm4/keyboard_scan.c')
-rw-r--r--chip/lm4/keyboard_scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/lm4/keyboard_scan.c b/chip/lm4/keyboard_scan.c
index 2966713768..380c9c4974 100644
--- a/chip/lm4/keyboard_scan.c
+++ b/chip/lm4/keyboard_scan.c
@@ -359,9 +359,6 @@ int keyboard_scan_init(void)
update_key_state();
recovery_key_pressed = check_recovery_key();
- /* Enable interrupts, now that we're set up */
- task_enable_irq(KB_SCAN_ROW_IRQ);
-
return EC_SUCCESS;
}
@@ -374,6 +371,9 @@ void keyboard_scan_task(void)
if (recovery_key_pressed)
uart_puts("[KB recovery key pressed at init!]\n");
+ /* Enable interrupts */
+ task_enable_irq(KB_SCAN_ROW_IRQ);
+
while (1) {
wait_for_interrupt();
task_wait_msg(-1);