summaryrefslogtreecommitdiff
path: root/src/arch/x86/acpi_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/acpi_device.c')
-rw-r--r--src/arch/x86/acpi_device.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index 47bcc52c1e..57f06498c8 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -81,6 +81,24 @@ const char *acpi_device_name(const struct device *dev)
return NULL;
}
+/* Locate and return the ACPI _HID (Hardware ID) for this device */
+const char *acpi_device_hid(const struct device *dev)
+{
+ if (!dev)
+ return NULL;
+
+ /* Check for device specific handler */
+ if (dev->ops->acpi_hid)
+ return dev->ops->acpi_hid(dev);
+
+ /*
+ * Don't walk up the tree to find any parent that can identify this device, as
+ * PNP devices are hard to identify.
+ */
+
+ return NULL;
+}
+
/* Recursive function to find the root device and print a path from there */
static ssize_t acpi_device_path_fill(const struct device *dev, char *buf,
size_t buf_len, size_t cur)