summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2016-11-15 09:28:13 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-17 07:08:25 -0800
commitff9c5dd0d281d9a4c86449f1a8c2f3db6a0a7217 (patch)
tree1e34cc960201eba1bf0fbe8d2e05aca8957613cf /common
parentdfc9b86c82204096e869678ad3b3b08dfa06ae6b (diff)
downloadchrome-ec-ff9c5dd0d281d9a4c86449f1a8c2f3db6a0a7217.tar.gz
keyboard: Always call keyboard_state_changed
8042 and USB HID keyboard will both use that function. Let's just make it a no-op in the MKBP case. BRANCH=none BUG=chrome-os-partner:59083 TEST=make buildall -j Change-Id: Iaee1bf2c6edff3db28f3db89fc292f9d1064483b Reviewed-on: https://chromium-review.googlesource.com/411602 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/keyboard_scan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index dd97e7f757..876d06c9fc 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -472,11 +472,13 @@ static int check_keys_changed(uint8_t *state)
state[c] ^= mask;
any_change = 1;
-#ifdef CONFIG_KEYBOARD_PROTOCOL_8042
/* Inform keyboard module if scanning is enabled */
- if (keyboard_scan_is_enabled())
+ if (keyboard_scan_is_enabled()) {
+ /* This is no-op for protocols that require a
+ * full keyboard matrix (e.g., MKBP).
+ */
keyboard_state_changed(i, c, new_mask ? 1 : 0);
-#endif
+ }
}
}