summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/acpi_device.c9
-rw-r--r--src/arch/x86/include/arch/acpi_device.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index a5984da1d7..48b7fee26c 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -166,6 +166,15 @@ const char *acpi_device_path_join(struct device *dev, const char *name)
return buf;
}
+int acpi_device_status(const struct device *dev)
+{
+ if (!dev->enabled)
+ return ACPI_STATUS_DEVICE_ALL_OFF;
+ if (dev->hidden)
+ return ACPI_STATUS_DEVICE_HIDDEN_ON;
+ return ACPI_STATUS_DEVICE_ALL_ON;
+}
+
/* ACPI 6.1 section 6.4.3.6: Extended Interrupt Descriptor */
void acpi_device_write_interrupt(const struct acpi_irq *irq)
{
diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h
index 31b97bc09f..2711af5a60 100644
--- a/src/arch/x86/include/arch/acpi_device.h
+++ b/src/arch/x86/include/arch/acpi_device.h
@@ -66,6 +66,7 @@ const char *acpi_device_name(struct device *dev);
const char *acpi_device_path(struct device *dev);
const char *acpi_device_scope(struct device *dev);
const char *acpi_device_path_join(struct device *dev, const char *name);
+int acpi_device_status(const struct device *dev);
/*
* ACPI Descriptor for extended Interrupt()