aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2023-04-25 00:29:38 +0200
committerHans de Goede <hdegoede@redhat.com>2023-05-09 11:54:42 +0200
commite8f8b448c168d7f2f93c9586cf789dee5d61182d (patch)
treed3854fd01c020a2b55e1be6fc6fae1d4ed766829 /Documentation/driver-api
parentd54bd4bc7b9ae9505f53440894b8c239c521f3da (diff)
downloadlinux-e8f8b448c168d7f2f93c9586cf789dee5d61182d.tar.gz
platform/x86: wmi: Add documentation
Add documentation for the WMI subsystem. The documentation describes both the ACPI WMI interface and the driver API for interacting with the WMI driver core. The information regarding the ACPI interface was retrieved from the Ubuntu kernel references and the Windows driver samples available on GitHub. The documentation is supposed to help driver developers writing WMI drivers, as many modern machines designed to run Windows provide an ACPI WMI interface. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20230424222939.208137-4-W_Armin@gmx.de Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/index.rst1
-rw-r--r--Documentation/driver-api/wmi.rst21
2 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index ff9aa1afdc6239..1e16a40da3baad 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -113,6 +113,7 @@ available subsections can be seen below.
xillybus
zorro
hte/index
+ wmi
.. only:: subproject and html
diff --git a/Documentation/driver-api/wmi.rst b/Documentation/driver-api/wmi.rst
new file mode 100644
index 00000000000000..6ca58c8249e548
--- /dev/null
+++ b/Documentation/driver-api/wmi.rst
@@ -0,0 +1,21 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+==============
+WMI Driver API
+==============
+
+The WMI driver core supports a more modern bus-based interface for interacting
+with WMI devices, and an older GUID-based interface. The latter interface is
+considered to be deprecated, so new WMI drivers should generally avoid it since
+it has some issues with multiple WMI devices and events sharing the same GUIDs
+and/or notification IDs. The modern bus-based interface instead maps each
+WMI device to a :c:type:`struct wmi_device <wmi_device>`, so it supports
+WMI devices sharing GUIDs and/or notification IDs. Drivers can then register
+a :c:type:`struct wmi_driver <wmi_driver>`, which will be bound to compatible
+WMI devices by the driver core.
+
+.. kernel-doc:: include/linux/wmi.h
+ :internal:
+
+.. kernel-doc:: drivers/platform/x86/wmi.c
+ :export: