acpi: implement Generic Event Device
Subsystems (2)
PATCH v2 1/1 acpi: implement Generic Event Device
Generic Event Device described in ACPI 6.1 allows platforms to handle platform interrupts in ACPI ASL statements. It borrows constructs like _EVT from GPIO events. All interrupts are listed in _CRS and the handler is written in _EVT method. Here is an example.
Device (GED0)
{
Name (_HID, "ACPI0013")
Name (_UID, 0)
Name(_CRS, ResourceTemplate ()
{
Interrupt(ResourceConsumer, Edge, ActiveHigh, Shared, , , )
{123}
})
Method (_EVT, 1) {
if (Lequal(123, Arg0))
{
}
}
}Wake capability has not been implemented yet.
Signed-off-by Sinan Kaya <[email protected]>
--- drivers/acpi/Makefile | 1 + drivers/acpi/evged.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 drivers/acpi/evged.c
drivers/acpi/Makefile +1 -0
@@ -46,6 +46,7 @@ acpi-y += acpi_pnp.o acpi-y += int340x_thermal.o acpi-y += power.o acpi-y += event.o +acpi-$(CONFIG_ACPI_REDUCED_HARDWARE_ONLY) += evged.o acpi-y += sysfs.o acpi-y += property.o acpi-$(CONFIG_X86) += acpi_cmos_rtc.o
drivers/acpi/evged.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
1.8.2.1
Rafael J. Wysocki
AppliedQuoted 23 lines · Sinan Kaya
Generic Event Device described in ACPI 6.1 allows platforms to handle platform interrupts in ACPI ASL statements. It borrows constructs like
_EVTfrom GPIO events. All interrupts are listed in_CRSand the handler is written in_EVTmethod. Here is an example.Device (GED0)
{Name (_HID, "ACPI0013") Name (_UID, 0) Name(_CRS, ResourceTemplate () { Interrupt(ResourceConsumer, Edge, ActiveHigh, Shared, , , ) {123} }) Method (_EVT, 1) { if (Lequal(123, Arg0)) { } } }
Quoted 3 lines
Wake capability has not been implemented yet.
Signed-off-by Sinan Kaya <[email protected]>
Applied, thanks!