x86: add support for Huawei WMI hotkeys.
PATCH 1/1 x86: add support for Huawei WMI hotkeys.
From bc069762e7e86dd3ab39e55d7b145deb85884dec Mon Sep 17 00:00:00 2001
From: Ayman Bagabas <[email protected]>
Date: Wed, 31 Oct 2018 11:24:43 -0400
Subject: [PATCH 1/3] x86: add support for Huawei WMI hotkeys.
This driver adds support for missing hotkeys on some Huawei laptops. Currently, only Huawei Matebook X Pro is supported. The driver recognizes the following keys: brightness keys, micmute, wlan, and Huawei special key. The brightness keys are ignored since they work out of the box.
Signed-off-by Ayman Bagabas <[email protected]>
--- drivers/platform/x86/Kconfig | 13 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/huawei_wmi.c | 225 ++++++++++++++++++++++++++++++ 3 files changed, 239 insertions(+) create mode 100644 drivers/platform/x86/huawei_wmi.c
drivers/platform/x86/Kconfig +13 -0
@@ -1229,6 +1229,19 @@ config I2C_MULTI_INSTANTIATE To compile this driver as a module, choose M here: the module will be called i2c-multi-instantiate. +config HUAWEI_LAPTOP + tristate "Huawei WMI hotkeys driver" + depends on ACPI + depends on ACPI_WMI + depends on INPUT + select INPUT_SPARSEKMAP + help + This driver provides support for Huawei WMI hotkeys. + It enables the missing keys and adds support to micmute + led found on these laptops.q + Supported devices are: + - Matebook X Pro + endif # X86_PLATFORM_DEVICES config PMC_ATOM
drivers/platform/x86/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_ACERHDF) += acerhdf.o obj-$(CONFIG_HP_ACCEL) += hp_accel.o obj-$(CONFIG_HP_WIRELESS) += hp-wireless.o obj-$(CONFIG_HP_WMI) += hp-wmi.o +obj-$(CONFIG_HUAWEI_LAPTOP) += huawei_wmi.o obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o obj-$(CONFIG_GPD_POCKET_FAN) += gpd-pocket-fan.o obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
drivers/platform/x86/huawei_wmi.c new file +225 -0
225 lines not on this page · raw message
Signature · 1 line
2.17.2
Quoted 3 lines · On Wed, Oct 31, 2018 at 5:57 PM <[email protected]> wrote:
Thank you for your patch!
It would be much better if you can send it using traditional tools, i.e. git send-email ....
Signature · 2 lines
With Best Regards, Andy Shevchenko