Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86: wmi: Move WMI core code into a separate directory

Move the WMI core code into a separate directory to prepare for
future additions to the WMI driver. Also update the description
of the Kconfig entry to better fit with the other subsystem
Kconfig entries.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251111131125.3379-5-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Armin Wolf and committed by
Ilpo Järvinen
e2c1b56f 32e3fee8

+47 -33
+1 -1
Documentation/driver-api/wmi.rst
··· 16 16 .. kernel-doc:: include/linux/wmi.h 17 17 :internal: 18 18 19 - .. kernel-doc:: drivers/platform/x86/wmi.c 19 + .. kernel-doc:: drivers/platform/wmi/core.c 20 20 :export:
+1 -1
MAINTAINERS
··· 402 402 F: Documentation/ABI/testing/sysfs-bus-wmi 403 403 F: Documentation/driver-api/wmi.rst 404 404 F: Documentation/wmi/ 405 - F: drivers/platform/x86/wmi.c 405 + F: drivers/platform/wmi/ 406 406 F: include/uapi/linux/wmi.h 407 407 408 408 ACRN HYPERVISOR SERVICE MODULE
+2
drivers/platform/Kconfig
··· 18 18 source "drivers/platform/x86/Kconfig" 19 19 20 20 source "drivers/platform/arm64/Kconfig" 21 + 22 + source "drivers/platform/wmi/Kconfig"
+1
drivers/platform/Makefile
··· 13 13 obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/ 14 14 obj-$(CONFIG_SURFACE_PLATFORMS) += surface/ 15 15 obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/ 16 + obj-$(CONFIG_ACPI_WMI) += wmi/
+34
drivers/platform/wmi/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0-or-later 2 + # 3 + # ACPI WMI Core 4 + # 5 + 6 + menuconfig ACPI_WMI 7 + tristate "ACPI-WMI support" 8 + depends on ACPI && X86 9 + help 10 + This option enables support for the ACPI-WMI driver core. 11 + 12 + The ACPI-WMI interface is a proprietary extension of ACPI allowing 13 + the platform firmware to expose WMI (Windows Management Instrumentation) 14 + objects used for managing various aspects of the underlying system. 15 + Mapping between ACPI control methods and WMI objects happens through 16 + special mapper devices (PNP0C14) defined inside the ACPI tables. 17 + 18 + Enabling this option is necessary for building the vendor specific 19 + ACPI-WMI client drivers for Acer, Dell an HP machines (among others). 20 + 21 + It is safe to enable this option even for machines that do not contain 22 + any ACPI-WMI mapper devices at all. 23 + 24 + if ACPI_WMI 25 + 26 + config ACPI_WMI_LEGACY_DEVICE_NAMES 27 + bool "Use legacy WMI device naming scheme" 28 + help 29 + Say Y here to force the WMI driver core to use the old WMI device naming 30 + scheme when creating WMI devices. Doing so might be necessary for some 31 + userspace applications but will cause the registration of WMI devices with 32 + the same GUID to fail in some corner cases. 33 + 34 + endif # ACPI_WMI
+8
drivers/platform/wmi/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0-or-later 2 + # 3 + # Makefile for linux/drivers/platform/wmi 4 + # ACPI WMI core 5 + # 6 + 7 + wmi-y := core.o 8 + obj-$(CONFIG_ACPI_WMI) += wmi.o
-30
drivers/platform/x86/Kconfig
··· 16 16 17 17 if X86_PLATFORM_DEVICES 18 18 19 - config ACPI_WMI 20 - tristate "WMI" 21 - depends on ACPI 22 - help 23 - This driver adds support for the ACPI-WMI (Windows Management 24 - Instrumentation) mapper device (PNP0C14) found on some systems. 25 - 26 - ACPI-WMI is a proprietary extension to ACPI to expose parts of the 27 - ACPI firmware to userspace - this is done through various vendor 28 - defined methods and data blocks in a PNP0C14 device, which are then 29 - made available for userspace to call. 30 - 31 - The implementation of this in Linux currently only exposes this to 32 - other kernel space drivers. 33 - 34 - This driver is a required dependency to build the firmware specific 35 - drivers needed on many machines, including Acer and HP laptops. 36 - 37 - It is safe to enable this driver even if your DSDT doesn't define 38 - any ACPI-WMI devices. 39 - 40 - config ACPI_WMI_LEGACY_DEVICE_NAMES 41 - bool "Use legacy WMI device naming scheme" 42 - depends on ACPI_WMI 43 - help 44 - Say Y here to force the WMI driver core to use the old WMI device naming 45 - scheme when creating WMI devices. Doing so might be necessary for some 46 - userspace applications but will cause the registration of WMI devices with 47 - the same GUID to fail in some corner cases. 48 - 49 19 config WMI_BMOF 50 20 tristate "WMI embedded Binary MOF driver" 51 21 depends on ACPI_WMI
-1
drivers/platform/x86/Makefile
··· 5 5 # 6 6 7 7 # Windows Management Interface 8 - obj-$(CONFIG_ACPI_WMI) += wmi.o 9 8 obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o 10 9 11 10 # WMI drivers
drivers/platform/x86/wmi.c drivers/platform/wmi/core.c