Introduce a new flag showing whether the event has an event handler/method.
For all the GPEs and Fixed Events,
1. ACPI_EVENT_FLAG_HANDLE is cleared, it's an "invalid" ACPI event.
2. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_DISABLE are set,
it's "disabled".
3. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_ENABLE are set,
it's "enabled".
4. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_WAKE_ENABLE are set,
it's "wake_enabled".
Among other things, this prevents incorrect reporting of ACPI events
as being "invalid" when it's really just (temporarily) "disabled".
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Allow users to enable/disable/clear a specific & valid GPE/Fixed Event
in user space.
This is useful for debugging, especially for some
interrupt storm issues.
All wakeup GPEs are disabled and they can not be enabled at runtime,
and we mark them as invalid.
All GPEs that don't have a _Lxx/_Exx method are marked as invalid.
All Fixed Events that don't have an event handler are marked as invalid
and they can't be enabled until an event handler is registered.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Ling Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
See Documentation/ABI/testing/sysfs-firmware-acpi
Based-on-original-patch-by: Luming Yu <luming.yu@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>