ACPI: Use GPE reference counting to support shared GPEs
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 17 Feb 2010 22:41:07 +0000 (23:41 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 23 Feb 2010 00:20:45 +0000 (16:20 -0800)
commit9630bdd9b15d2f489c646d8bc04b60e53eb5ec78
treeed99f729cb9142492e0cdf2f7d19f2f33069a3f4
parentc39fae1416d59fd565606793f090cebe3720d50d
ACPI: Use GPE reference counting to support shared GPEs

ACPI GPEs may map to multiple devices.  The current GPE interface
only provides a mechanism for enabling and disabling GPEs, making
it difficult to change the state of GPEs at runtime without extensive
cooperation between devices.

Add an API to allow devices to indicate whether or not they want
their device's GPE to be enabled for both runtime and wakeup events.

Remove the old GPE type handling entirely, which gets rid of various
quirks, like the implicit disabling with GPE type setting. This
requires a small amount of rework in order to ensure that non-wake
GPEs are enabled by default to preserve existing behaviour.

Based on patches from Matthew Garrett <mjg@redhat.com>.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 files changed:
drivers/acpi/acpica/acevents.h
drivers/acpi/acpica/aclocal.h
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evgpeblk.c
drivers/acpi/acpica/evxface.c
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/sleep.c
drivers/acpi/system.c
drivers/acpi/wakeup.c
include/acpi/acpixf.h
include/acpi/actypes.h