Add a new function to acpi.h / wmi.c that returns _UID of the ACPI WMI device. For example, it returns "ATK" for the following declaration in DSDT: Device (ATKD) { Name (_HID, "PNP0C14" /* Windows Management Instrumentation Device */) // _HID: Hardware ID Name (_UID, "ATK") // _UID: Unique ID .. Generally, it is possible that multiple PNP0C14 ACPI devices are present in the system as mentioned in the commit message of commit bff431e49ff5 ("ACPI: WMI: Add ACPI-WMI mapping driver"). Therefore the _UID is returned for a specific ACPI device that declares the given GUID, to which it is also mapped by other methods of wmi module.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -380,6 +380,7 @@ extern acpi_status wmi_install_notify_handler(const char *guid, · 379 unmodified lines | |||
| 380 | extern acpi_status wmi_remove_notify_handler(const char *guid); | 380 | extern acpi_status wmi_remove_notify_handler(const char *guid); |
| 381 | extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out); | 381 | extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out); |
| 382 | extern bool wmi_has_guid(const char *guid); | 382 | extern bool wmi_has_guid(const char *guid); |
| 383 | extern char *wmi_get_acpi_device_uid(const char *guid); | ||
| 383 | 384 | ||
| 384 | #endif /* CONFIG_ACPI_WMI */ | 385 | #endif /* CONFIG_ACPI_WMI */ |
| 385 | 386 | ||