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
)