From 20dd2301234bc0f57018e4b51380e53f652ac30c Mon Sep 17 00:00:00 2001 From: Todd Broch Date: Fri, 19 Apr 2013 10:49:02 -0700 Subject: [PATCH] WORKAROUND: mkbp: Remove KEY_BATTERY from valid keys. While previous ghosting fix: 688c20f CHROMIUM: Strengthen ghosting algorithm. Did help rule out null keys it was thought it would also correctly identify 3 vs. 4 keypresses (sharing row/col) regardless of whether key was virtual (KEY_BATTERY) or real. It does not however. This change migrates KEY_BATTERY to invalid key while algorithm is further refined. BUG=chrome-os-partner:18814 TEST=manual boot Spring plugged after an EC reset and see no ghosting issues for sequences ctrl + u|w|n|t Change-Id: I1038a18c353e84a52ad77e44e497c747d310addf Signed-off-by: Todd Broch Reviewed-on: https://gerrit.chromium.org/gerrit/48674 Reviewed-by: Luigi Semenzato Reviewed-by: Vincent Palatin --- drivers/input/keyboard/mkbp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/mkbp.c b/drivers/input/keyboard/mkbp.c index 223a1a865723..fafc34d7b8a2 100644 --- a/drivers/input/keyboard/mkbp.c +++ b/drivers/input/keyboard/mkbp.c @@ -384,7 +384,7 @@ static void __devinit mkbp_compute_valid_keys(struct mkbp_device *mkbp_dev) for (col = 0; col < MKBP_NUM_COLS; col++) { for (row = 0; row < MKBP_NUM_ROWS; row++) { code = mkbp_keycodes[row][col]; - if (code) + if (code && (code != KEY_BATTERY)) mkbp_dev->valid_keys[col] |= 1 << row; } dev_dbg(mkbp_dev->dev, "valid_keys[%02d] = 0x%02x\n", -- 2.20.1