Skip to content

Commit e2c1b56

Browse files
Wer-Wolfij-intel
authored andcommitted
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>
1 parent 32e3fee commit e2c1b56

9 files changed

Lines changed: 47 additions & 33 deletions

File tree

Documentation/driver-api/wmi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ which will be bound to compatible WMI devices by the driver core.
1616
.. kernel-doc:: include/linux/wmi.h
1717
:internal:
1818

19-
.. kernel-doc:: drivers/platform/x86/wmi.c
19+
.. kernel-doc:: drivers/platform/wmi/core.c
2020
:export:

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ S: Maintained
402402
F: Documentation/ABI/testing/sysfs-bus-wmi
403403
F: Documentation/driver-api/wmi.rst
404404
F: Documentation/wmi/
405-
F: drivers/platform/x86/wmi.c
405+
F: drivers/platform/wmi/
406406
F: include/uapi/linux/wmi.h
407407

408408
ACRN HYPERVISOR SERVICE MODULE

drivers/platform/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ source "drivers/platform/surface/Kconfig"
1818
source "drivers/platform/x86/Kconfig"
1919

2020
source "drivers/platform/arm64/Kconfig"
21+
22+
source "drivers/platform/wmi/Kconfig"

drivers/platform/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
1313
obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/
1414
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
1515
obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/
16+
obj-$(CONFIG_ACPI_WMI) += wmi/

drivers/platform/wmi/Kconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

drivers/platform/wmi/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

drivers/platform/x86/Kconfig

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,6 @@ menuconfig X86_PLATFORM_DEVICES
1616

1717
if X86_PLATFORM_DEVICES
1818

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-
4919
config WMI_BMOF
5020
tristate "WMI embedded Binary MOF driver"
5121
depends on ACPI_WMI

drivers/platform/x86/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66

77
# Windows Management Interface
8-
obj-$(CONFIG_ACPI_WMI) += wmi.o
98
obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o
109

1110
# WMI drivers

0 commit comments

Comments
 (0)