Merge tag 'pull-ppc-20220706' of https://gitlab.com/danielhb/qemu into staging
[qemu/rayw.git] / hw / acpi / acpi_interface.c
blobc668d361f64fdc0a9ce9fe317ae065d0567d3e2e
1 #include "qemu/osdep.h"
2 #include "hw/acpi/acpi_dev_interface.h"
3 #include "hw/acpi/acpi_aml_interface.h"
4 #include "qemu/module.h"
6 void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
8 AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
9 if (adevc->send_event) {
10 AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
11 adevc->send_event(adev, event);
15 static void register_types(void)
17 static const TypeInfo acpi_dev_if_info = {
18 .name = TYPE_ACPI_DEVICE_IF,
19 .parent = TYPE_INTERFACE,
20 .class_size = sizeof(AcpiDeviceIfClass),
22 static const TypeInfo acpi_dev_aml_if_info = {
23 .name = TYPE_ACPI_DEV_AML_IF,
24 .parent = TYPE_INTERFACE,
25 .class_size = sizeof(AcpiDevAmlIfClass),
29 type_register_static(&acpi_dev_if_info);
30 type_register_static(&acpi_dev_aml_if_info);
33 type_init(register_types)