platform/x86: acer-wmi: add another KEY_POWER keycode
Subsystems (2)
PATCH 1/1 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.
--- drivers/platform/x86/acer-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/acer-wmi.c +1 -0
@@ -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} };
Signature · 1 line
2.15.1
Quoted 7 lines · Antonio Rosario Intilisano
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 code0x87when the power button key is pressed.Add this keycode to the table so that it is converted to an appropriate input event.
I pushed it to my review and testing queue, thanks!
Though, see below.
drivers/platform/x86/acer-wmi.c static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
Quoted 17 lines
Signed-off-by Antonio Rosario Intilisano <[email protected]>Cc Chris Chiu <[email protected]>Cc Daniel Drake <[email protected]>Cc Andy Shevchenko <[email protected]>--- drivers/platform/x86/acer-wmi.c | 1 + 1 file changed, 1 insertion(+)drivers/platform/x86/acer-wmi.c +0
-0@@ -129,6 +129,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
This is malformed patch. It states 6 lines for context, though only 4 provided. Please, fix your tools.
Quoted 9 lines
drivers/platform/x86/acer-wmi.c +1
-1{KE_KEY, 0x85, {KEY_TOUCHPAD_TOGGLE} }, {KE_KEY, 0x86, {KEY_WLAN} }, + {KE_KEY, 0x87, {KEY_POWER} }, {KE_END, 0} }; --2.15.1
Signature · 2 lines
With Best Regards, Andy Shevchenko