* [PATCH] ACPI: device-id: document struct acpi_device_id
@ 2026-09-13 9:51 Miguel Garcia
0 siblings, 0 replies; only message in thread
From: Miguel Garcia @ 2026-09-13 9:51 UTC (permalink / raw)
To: rafael, u.kleine-koenig
Cc: kmehltretter, andriy.shevchenko, corbet, linux-acpi, linux-doc,
linux-kernel, Miguel Garcia
struct acpi_device_id lacks kernel-doc, so extracting documentation from
its header describes ACPI_DEVICE_CLASS but not the matching table entry.
Document the four members, ID and class-code matching, and the table
terminator. This complements the pending documentation header-split
update without changing its include directives.
An LLM drafted this comment and changelog after being asked to address
the missing documentation noted in the header-split discussion. The
field descriptions were checked against the ACPI matching code. The
extracted documentation passes kernel-doc and a focused Sphinx HTML
build with warnings treated as errors; checkpatch reports no warnings.
Link: https://lore.kernel.org/all/aqEWUBf1pewPP_K2@monoceros/
Assisted-by: LLM
Signed-off-by: Miguel Garcia <miguelgarciaroman8@gmail.com>
---
include/linux/device-id/acpi.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/device-id/acpi.h b/include/linux/device-id/acpi.h
index 65800cefd..8c3b30ebf 100644
--- a/include/linux/device-id/acpi.h
+++ b/include/linux/device-id/acpi.h
@@ -9,6 +9,16 @@ typedef unsigned long kernel_ulong_t;
#define ACPI_ID_LEN 16
+/**
+ * struct acpi_device_id - ACPI device matching table entry
+ * @id: NUL-terminated hardware ID (_HID) or compatible ID (_CID) to match.
+ * @driver_data: Data private to the driver.
+ * @cls: PCI-defined class, subclass and programming interface code (_CLS).
+ * @cls_msk: Mask selecting the class-code fields to match.
+ *
+ * Use @id for ID matching or ACPI_DEVICE_CLASS() for class-code matching.
+ * Terminate the table with an entry whose @id is empty and @cls is zero.
+ */
struct acpi_device_id {
__u8 id[ACPI_ID_LEN];
kernel_ulong_t driver_data;
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-13 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 9:51 [PATCH] ACPI: device-id: document struct acpi_device_id Miguel Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox