x86: add support for Huawei WMI hotkeys.
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.
--- 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 24 lines · Ayman Bagabas
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.cdrivers/platform/x86/Kconfig +2
-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"
drivers/platform/x86/Kconfig config I2C_MULTI_INSTANTIATE · line 1243
Quoted 10 lines
drivers/platform/x86/Kconfig +10
-0+ 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
Extra q. Plus we normally say module name in Kconfig help text. See above.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html