summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-10-16 16:08:39 -0700
committerSimon Glass <sjg@chromium.org>2012-10-29 14:47:06 -0700
commitdcc92c72cf5350a02387770b4ecf9dbeb02699dd (patch)
treea33422e1240814d3feba3648d4afc3e12d10faa3
parentd15e55a4bd61f709836f8807269b5bc6ea1a2af0 (diff)
downloadchrome-ec-dcc92c72cf5350a02387770b4ecf9dbeb02699dd.tar.gz
Revert "Revert "stm32: Drop key scan masks""
This reverts commit 63c5547987b7ad6eefe7ecd7e2025cc87d161331. This brings the ToT code back into the branch. BUG=chrome-os-partner:12179 BRANCH=snow TEST=manual Use keyboard in U-Boot, browser, gmail and write a paragraph of text. Try pressing keys quickly. See that things seem to work correctly. Change-Id: I5382b7285fead6ce5cb380a7f89579b7b478bac8 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36075 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r--chip/stm32/keyboard_scan.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c
index 35fa651ba0..9e75e7a92d 100644
--- a/chip/stm32/keyboard_scan.c
+++ b/chip/stm32/keyboard_scan.c
@@ -44,20 +44,6 @@ static struct mutex scanning_enabled;
/* The keyboard state from the last read */
static uint8_t raw_state[KB_OUTPUTS];
-/* 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) */
-/* TODO: (crosbug.com/p/7485) fill in real key mask with 0-bits for coords that
- aren't keys */
-static const uint8_t actual_key_masks[4][KB_OUTPUTS] = {
- {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
- {0},
- {0},
- {0},
- };
-
/* Key masks for special boot keys */
#define MASK_INDEX_ESC 1
#define MASK_VALUE_ESC 0x02
@@ -279,9 +265,6 @@ static int check_keys_changed(void)
/* Invert it so 0=not pressed, 1=pressed */
r ^= 0xff;
- /* Mask off keys that don't exist so they never show
- * as pressed */
- r &= actual_key_mask[c];
#ifdef OR_WITH_CURRENT_STATE_FOR_TESTING
/* KLUDGE - or current state in, so we can make sure
@@ -373,10 +356,6 @@ int keyboard_scan_init(void)
/* Tri-state (put into Hi-Z) the outputs */
select_column(COL_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 */
check_keys_changed();