summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-01-13 09:40:39 -0800
committerPatrick Georgi <pgeorgi@google.com>2017-01-24 09:33:48 +0100
commit674e971dc4f7696393a7f7a18cbbc581029d9e0b (patch)
tree344b13f15e07f77a0ec123eab8677b1b5e54df78
parent0f6d10ba8f8f711f2ff7fa5c8f306e18a42b8974 (diff)
downloadcoreboot-674e971dc4f7696393a7f7a18cbbc581029d9e0b.tar.xz
libpayload: drivers/keyboard: report power button events
Power button events are usually dropped because the button is not in the keyboard matrix range. Add condition to forward it like other keys. BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and make sure power button selection in depthcharge's detachable menus is processed on reef. Change-Id: I86897fa8d73a56533ef62bba05458ac3d339237e Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 25654e214f0ab8685d445ced62612a02be851126 Original-Change-Id: I516a0043bd7730789728d5c5498d0a0f30a2acac Original-Signed-off-by: Shelley Chen <shchen@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/428199 Original-Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://review.coreboot.org/18177 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--payloads/libpayload/drivers/keyboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/keyboard.c b/payloads/libpayload/drivers/keyboard.c
index 6431336863..23c87803a8 100644
--- a/payloads/libpayload/drivers/keyboard.c
+++ b/payloads/libpayload/drivers/keyboard.c
@@ -32,6 +32,7 @@
#include <libpayload.h>
#define I8042_CMD_DIS_KB 0xad
+#define POWER_BUTTON 0x90
struct layout_maps {
const char *country;
@@ -255,6 +256,9 @@ int keyboard_getchar(void)
}
}
+ if (ch == 0x5e)
+ ret = POWER_BUTTON;
+
return ret;
}