From: Antonio Rosario Intilisano Date: Fri, 27 Apr 2018 21:50:21 +0000 (+0200) Subject: platform/x86: acer-wmi: add another KEY_POWER keycode X-Git-Tag: v4.18-rc1~25^2~13 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c7a437fdd6e794290082cd19808627c661e15c5d;p=uclinux-h8%2Flinux.git platform/x86: acer-wmi: add another KEY_POWER keycode Now that we have informed the firmware that the Power Button driver is active, laptops such as the Acer Swift 3 will generate a WMI key event with code 0x87 when the power button key is pressed. Add this keycode to the table so that it is converted to an appropriate input event. Signed-off-by: Antonio Rosario Intilisano Acked-by: Gianfranco Costamagna Tested-by: Antonio Rosario Intilisano Cc: Chris Chiu Cc: Daniel Drake Cc: Andy Shevchenko Signed-off-by: Andy Shevchenko --- diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 1be71f956d5c..8952173dd380 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -129,6 +129,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} }, {KE_KEY, 0x85, {KEY_TOUCHPAD_TOGGLE} }, {KE_KEY, 0x86, {KEY_WLAN} }, + {KE_KEY, 0x87, {KEY_POWER} }, {KE_END, 0} };