2016-01-26 19:17:03 +01:00
|
|
|
#include "qemu/osdep.h"
|
2014-06-16 19:12:26 +02:00
|
|
|
#include "hw/acpi/acpi_dev_interface.h"
|
2022-06-08 15:53:06 +02:00
|
|
|
#include "hw/acpi/acpi_aml_interface.h"
|
2014-06-16 19:12:26 +02:00
|
|
|
#include "qemu/module.h"
|
|
|
|
|
2016-05-31 11:57:57 +02:00
|
|
|
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
|
|
|
|
{
|
|
|
|
AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
|
|
|
|
if (adevc->send_event) {
|
|
|
|
AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
|
|
|
|
adevc->send_event(adev, event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-16 19:12:26 +02:00
|
|
|
static void register_types(void)
|
|
|
|
{
|
|
|
|
static const TypeInfo acpi_dev_if_info = {
|
|
|
|
.name = TYPE_ACPI_DEVICE_IF,
|
|
|
|
.parent = TYPE_INTERFACE,
|
|
|
|
.class_size = sizeof(AcpiDeviceIfClass),
|
|
|
|
};
|
2022-06-08 15:53:06 +02:00
|
|
|
static const TypeInfo acpi_dev_aml_if_info = {
|
|
|
|
.name = TYPE_ACPI_DEV_AML_IF,
|
|
|
|
.parent = TYPE_INTERFACE,
|
|
|
|
.class_size = sizeof(AcpiDevAmlIfClass),
|
|
|
|
};
|
|
|
|
|
2014-06-16 19:12:26 +02:00
|
|
|
|
|
|
|
type_register_static(&acpi_dev_if_info);
|
2022-06-08 15:53:06 +02:00
|
|
|
type_register_static(&acpi_dev_aml_if_info);
|
2014-06-16 19:12:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type_init(register_types)
|