summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/lm4/keyboard_scan.c24
-rw-r--r--chip/stm32/keyboard_scan.c4
-rw-r--r--include/keyboard_scan.h2
3 files changed, 7 insertions, 23 deletions
diff --git a/chip/lm4/keyboard_scan.c b/chip/lm4/keyboard_scan.c
index d776a4f6ed..a07170dcfe 100644
--- a/chip/lm4/keyboard_scan.c
+++ b/chip/lm4/keyboard_scan.c
@@ -56,16 +56,10 @@ static uint8_t scan_edge_index[KB_COLS][8];
enum boot_key boot_key_value = BOOT_KEY_OTHER;
/* Mask with 1 bits only for keys that actually exist */
-static const uint8_t *actual_key_mask;
-
-/* All actual key masks (todo: move to keyboard matrix definition) */
-static const uint8_t actual_key_masks[4][KB_COLS] = {
- {0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
- 0xa4, 0xff, 0xf6, 0x55, 0xfa, 0xc8}, /* full set */
- {0},
- {0},
- {0},
- };
+static const uint8_t actual_key_mask[KB_COLS] = {
+ 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
+ 0xa4, 0xff, 0xf6, 0x55, 0xfa, 0xc8 /* full set */
+};
/*
* Print all keyboard scan state changes? Off by default because it generates
@@ -416,7 +410,7 @@ enum boot_key keyboard_scan_get_boot_key(void)
return boot_key_value;
}
-int keyboard_scan_init(void)
+void keyboard_scan_init(void)
{
/* Configure GPIO */
lm4_configure_keyboard_gpio();
@@ -424,12 +418,6 @@ int keyboard_scan_init(void)
/* Tri-state the columns */
lm4_select_column(COLUMN_TRI_STATE_ALL);
- /*
- * TODO: method to set which keyboard we have, so we set the actual
- * key mask properly.
- */
- actual_key_mask = actual_key_masks[0];
-
/* Initialize raw state */
read_matrix(debounced_state);
memcpy(prev_state, debounced_state, sizeof(prev_state));
@@ -440,8 +428,6 @@ int keyboard_scan_init(void)
/* Trigger event if recovery key was pressed */
if (boot_key_value == BOOT_KEY_ESC)
host_set_single_event(EC_HOST_EVENT_KEYBOARD_RECOVERY);
-
- return EC_SUCCESS;
}
void keyboard_scan_task(void)
diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c
index a16bd09edb..34c4f7147b 100644
--- a/chip/stm32/keyboard_scan.c
+++ b/chip/stm32/keyboard_scan.c
@@ -499,7 +499,7 @@ static int check_recovery_key(const uint8_t *state)
}
-int keyboard_scan_init(void)
+void keyboard_scan_init(void)
{
/* Tri-state (put into Hi-Z) the outputs */
select_column(COL_TRI_STATE_ALL);
@@ -510,8 +510,6 @@ int keyboard_scan_init(void)
/* is recovery key pressed on cold startup ? */
check_recovery_key(debounced_state);
-
- return EC_SUCCESS;
}
/* Scan the keyboard until all keys are released */
diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h
index f92e8a3925..63384b10fb 100644
--- a/include/keyboard_scan.h
+++ b/include/keyboard_scan.h
@@ -11,7 +11,7 @@
#include "common.h"
/* Initializes the module. */
-int keyboard_scan_init(void);
+void keyboard_scan_init(void);
/* Key held down at keyboard-controlled reset boot time. */
enum boot_key {