These are cherrypicks from the aarch64-laptops [1] effort. I have pinged those maintainers pointing out that these patches have not been submitted upstream. In the future it should be... Otherwise, I'll keep rebasing this.
This is useful on the AArch64 laptops [2] booting in ACPI mode, as they are Win10 laptops they use/publish WMI, hence it should stop being x86 only and be enabled on arm64 too.
[1] https://github.com/aarch64-laptops/linux/tree/laptops-ubuntu [2] ASUS NovaGo TP370QL, HP Envy x2, Lenovo Mixx 630 & Yoga C630, and Samsung Book2
Ard Biesheuvel (2): UBUNTU: SAUCE: acpi: move WMI subsystem to generic code UBUNTU: SAUCE: acpi/wmi: move BMOF driver to generic code
Dimitri John Ledkov (1): UBUNTU: [Config] Update WMI_BMOF annotations.
.../abi/5.3.0-0.1/arm64/generic.modules | 2 ++ debian.master/config/annotations | 4 +-- drivers/acpi/Kconfig | 33 +++++++++++++++++++ drivers/acpi/Makefile | 2 ++ drivers/{platform/x86 => acpi}/wmi-bmof.c | 0 drivers/{platform/x86 => acpi}/wmi.c | 0 drivers/platform/x86/Kconfig | 33 ------------------- drivers/platform/x86/Makefile | 2 -- 8 files changed, 39 insertions(+), 37 deletions(-) rename drivers/{platform/x86 => acpi}/wmi-bmof.c (100%) rename drivers/{platform/x86 => acpi}/wmi.c (100%)
From: Ard Biesheuvel ard.biesheuvel@linaro.org
WMI is now used on arm64 ACPI laptops as well, so move the support code to drivers/acpi
Signed-off-by: Ard Biesheuvel ard.biesheuvel@linaro.org Signed-off-by: Dimitri John Ledkov xnox@ubuntu.com --- drivers/acpi/Kconfig | 21 +++++++++++++++++++++ drivers/acpi/Makefile | 1 + drivers/{platform/x86 => acpi}/wmi.c | 0 drivers/platform/x86/Kconfig | 21 --------------------- drivers/platform/x86/Makefile | 1 - 5 files changed, 22 insertions(+), 22 deletions(-) rename drivers/{platform/x86 => acpi}/wmi.c (100%)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 5f6158973289..8955bdd8d693 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -576,6 +576,27 @@ config TPS68470_PMIC_OPREGION region, which must be available before any of the devices using this, are probed.
+config ACPI_WMI + tristate "WMI" + depends on ACPI + help + This driver adds support for the ACPI-WMI (Windows Management + Instrumentation) mapper device (PNP0C14) found on some systems. + + ACPI-WMI is a proprietary extension to ACPI to expose parts of the + ACPI firmware to userspace - this is done through various vendor + defined methods and data blocks in a PNP0C14 device, which are then + made available for userspace to call. + + The implementation of this in Linux currently only exposes this to + other kernel space drivers. + + This driver is a required dependency to build the firmware specific + drivers needed on many machines, including Acer and HP laptops. + + It is safe to enable this driver even if your DSDT doesn't define + any ACPI-WMI devices. + endif # ACPI
config X86_PM_TIMER diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 5d361e4e3405..480ae10374de 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -94,6 +94,7 @@ obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o obj-$(CONFIG_ACPI_DEBUGGER_USER) += acpi_dbg.o obj-$(CONFIG_ACPI_PPTT) += pptt.o +obj-$(CONFIG_ACPI_WMI) += wmi.o
# processor has its own "processor." module_param namespace processor-y := processor_driver.o diff --git a/drivers/platform/x86/wmi.c b/drivers/acpi/wmi.c similarity index 100% rename from drivers/platform/x86/wmi.c rename to drivers/acpi/wmi.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 27696d68abe8..74421eacb5e6 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -747,27 +747,6 @@ config ASUS_WIRELESS If you choose to compile this driver as a module the module will be called asus-wireless.
-config ACPI_WMI - tristate "WMI" - depends on ACPI - help - This driver adds support for the ACPI-WMI (Windows Management - Instrumentation) mapper device (PNP0C14) found on some systems. - - ACPI-WMI is a proprietary extension to ACPI to expose parts of the - ACPI firmware to userspace - this is done through various vendor - defined methods and data blocks in a PNP0C14 device, which are then - made available for userspace to call. - - The implementation of this in Linux currently only exposes this to - other kernel space drivers. - - This driver is a required dependency to build the firmware specific - drivers needed on many machines, including Acer and HP laptops. - - It is safe to enable this driver even if your DSDT doesn't define - any ACPI-WMI devices. - config WMI_BMOF tristate "WMI embedded Binary MOF driver" depends on ACPI_WMI diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index a7163e313ecc..09a7c704004d 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -45,7 +45,6 @@ obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o -obj-$(CONFIG_ACPI_WMI) += wmi.o obj-$(CONFIG_MSI_WMI) += msi-wmi.o obj-$(CONFIG_PEAQ_WMI) += peaq-wmi.o obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o
From: Ard Biesheuvel ard.biesheuvel@linaro.org
Move the ACPI WMI BMOF driver to generic code, so that ARM-based Lenovo Yoga laptops can make use of it.
Signed-off-by: Ard Biesheuvel ard.biesheuvel@linaro.org Signed-off-by: Dimitri John Ledkov xnox@ubuntu.com --- drivers/acpi/Kconfig | 12 ++++++++++++ drivers/acpi/Makefile | 1 + drivers/{platform/x86 => acpi}/wmi-bmof.c | 0 drivers/platform/x86/Kconfig | 12 ------------ drivers/platform/x86/Makefile | 1 - 5 files changed, 13 insertions(+), 13 deletions(-) rename drivers/{platform/x86 => acpi}/wmi-bmof.c (100%)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 8955bdd8d693..e6321e3d4200 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -597,6 +597,18 @@ config ACPI_WMI It is safe to enable this driver even if your DSDT doesn't define any ACPI-WMI devices.
+config WMI_BMOF + tristate "WMI embedded Binary MOF driver" + depends on ACPI_WMI + default ACPI_WMI + ---help--- + Say Y here if you want to be able to read a firmware-embedded + WMI Binary MOF data. Using this requires userspace tools and may be + rather tedious. + + To compile this driver as a module, choose M here: the module will + be called wmi-bmof. + endif # ACPI
config X86_PM_TIMER diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 480ae10374de..6ee1f1bdb499 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -95,6 +95,7 @@ obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o obj-$(CONFIG_ACPI_DEBUGGER_USER) += acpi_dbg.o obj-$(CONFIG_ACPI_PPTT) += pptt.o obj-$(CONFIG_ACPI_WMI) += wmi.o +obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o
# processor has its own "processor." module_param namespace processor-y := processor_driver.o diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/acpi/wmi-bmof.c similarity index 100% rename from drivers/platform/x86/wmi-bmof.c rename to drivers/acpi/wmi-bmof.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 74421eacb5e6..6f98d354416f 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -747,18 +747,6 @@ config ASUS_WIRELESS If you choose to compile this driver as a module the module will be called asus-wireless.
-config WMI_BMOF - tristate "WMI embedded Binary MOF driver" - depends on ACPI_WMI - default ACPI_WMI - ---help--- - Say Y here if you want to be able to read a firmware-embedded - WMI Binary MOF data. Using this requires userspace tools and may be - rather tedious. - - To compile this driver as a module, choose M here: the module will - be called wmi-bmof. - config INTEL_WMI_THUNDERBOLT tristate "Intel WMI thunderbolt force power driver" depends on ACPI_WMI diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index 09a7c704004d..661fe424ad6a 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -49,7 +49,6 @@ obj-$(CONFIG_MSI_WMI) += msi-wmi.o obj-$(CONFIG_PEAQ_WMI) += peaq-wmi.o obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o -obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o obj-$(CONFIG_INTEL_WMI_THUNDERBOLT) += intel-wmi-thunderbolt.o obj-$(CONFIG_XIAOMI_WMI) += xiaomi-wmi.o
Move ACPI_WMI/WMI_BMOF to ACPI section, and add arm64 'm' annotation.
Signed-off-by: Dimitri John Ledkov xnox@ubuntu.com --- debian.master/abi/5.3.0-0.1/arm64/generic.modules | 2 ++ debian.master/config/annotations | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/debian.master/abi/5.3.0-0.1/arm64/generic.modules b/debian.master/abi/5.3.0-0.1/arm64/generic.modules index c7228ebb6582..831478893ca9 100644 --- a/debian.master/abi/5.3.0-0.1/arm64/generic.modules +++ b/debian.master/abi/5.3.0-0.1/arm64/generic.modules @@ -5666,6 +5666,8 @@ wm8775 wm8994 wm8994-regulator wm97xx-ts +wmi +wmi-bmof wp512 wusb-cbaf wusb-wa diff --git a/debian.master/config/annotations b/debian.master/config/annotations index 0ce63ed6d25a..f8e645b1c122 100644 --- a/debian.master/config/annotations +++ b/debian.master/config/annotations @@ -53,6 +53,8 @@ CONFIG_ACPI_EXTLOG policy<{'amd64': 'm', 'i386': 'm CONFIG_ACPI_CONFIGFS policy<{'amd64': 'm', 'arm64': 'm', 'i386': 'm'}> CONFIG_TPS68470_PMIC_OPREGION policy<{'amd64': 'y', 'arm64': 'y', 'i386': 'y'}> CONFIG_X86_PM_TIMER policy<{'amd64': 'y', 'i386': 'y'}> +CONFIG_ACPI_WMI policy<{'amd64': 'm', 'i386': 'm', 'arm64': 'm'}> +CONFIG_WMI_BMOF policy<{'amd64': 'm', 'i386': 'm', 'arm64': 'm'}> # CONFIG_ACPI_PROCFS_POWER mark<DEPRECATED> CONFIG_ACPI_CUSTOM_METHOD mark<ENFORCED> note<SECURITY: allows arbitrary execution> @@ -9467,8 +9469,6 @@ CONFIG_THINKPAD_ACPI_VIDEO policy<{'amd64': 'y', 'i386': 'y CONFIG_THINKPAD_ACPI_HOTKEY_POLL policy<{'amd64': 'y', 'i386': 'y'}>
# Menu: Device Drivers >> X86 Platform Specific Device Drivers >> WMI -CONFIG_ACPI_WMI policy<{'amd64': 'm', 'i386': 'm'}> -CONFIG_WMI_BMOF policy<{'amd64': 'm', 'i386': 'm'}> CONFIG_INTEL_WMI_THUNDERBOLT policy<{'amd64': 'm', 'i386': 'm'}> CONFIG_XIAOMI_WMI policy<{'amd64': 'm', 'i386': 'm'}> CONFIG_MSI_WMI policy<{'amd64': 'm', 'i386': 'm'}>
On Tue, Jul 30, 2019 at 03:07:01PM -0400, Dimitri John Ledkov wrote:
These are cherrypicks from the aarch64-laptops [1] effort. I have pinged those maintainers pointing out that these patches have not been submitted upstream. In the future it should be... Otherwise, I'll keep rebasing this.
This is useful on the AArch64 laptops [2] booting in ACPI mode, as they are Win10 laptops they use/publish WMI, hence it should stop being x86 only and be enabled on arm64 too.
[1] https://github.com/aarch64-laptops/linux/tree/laptops-ubuntu [2] ASUS NovaGo TP370QL, HP Envy x2, Lenovo Mixx 630 & Yoga C630, and Samsung Book2
Ard Biesheuvel (2): UBUNTU: SAUCE: acpi: move WMI subsystem to generic code UBUNTU: SAUCE: acpi/wmi: move BMOF driver to generic code
Dimitri John Ledkov (1): UBUNTU: [Config] Update WMI_BMOF annotations.
Sorry, I lost track of these patches.
These look reasonable enough. Are they making their way upstream? I don't see them in linux-next currently. Since they move a couple of files they will be a headache to carry as sauce patches long term, however if they will be upstream reasonably soon then it's probably okay to carry them for eoan.
Thanks, Seth
aarch64-laptops@lists.linaro.org