Skip to content

Rework GPE handling

Matthew Garrett linux-acpi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ACPI: Add infrastructure for refcounting GPE consumersdrivers/acpi/acpica/aclocal.h drivers/acpi/acpica/evxfevnt.c include/acpi/acpixf.h+171 -02 replies
2/3ACPI: Add support for new refcounted GPE API to driversdrivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/wakeup.c+22 -00 replies
3/3ACPI: Remove old GPE API and transition code entirely to new onedrivers/acpi/acpica/acevents.h drivers/acpi/acpica/evgpe.c drivers/acpi/acpica/evgpeblk.c +6 more+41 -4352 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Rework GPE handling

The current GPE code attempts to define GPEs as either runtime (the default), wake or run/wake. These states are orthogonal to whether or not a GPE is actually enabled or not. Further, various additional flags are defined and set, but never used.

This architecture is additionally complicated by changing the type of a GPE causing it to be disabled, resulting in complex functions that then have to conditionally re-enable a GPE. It also makes it impossible to determine how many consumers a given GPE has, preventing us from being able to implement runtime power management for devices requiring GPEs for wakeup notification.

This patchset adds a new, simpler API and transitions the existing users over to it. It then removes the old code.

 drivers/acpi/acpica/acevents.h |    6 -
 drivers/acpi/acpica/aclocal.h  |    2 
 drivers/acpi/acpica/evgpe.c    |  150 ++++---------------------------------
 drivers/acpi/acpica/evgpeblk.c |  164 +----------------------------------------
 drivers/acpi/acpica/evxface.c  |   14 ---
 drivers/acpi/acpica/evxfevnt.c |  139 ++++++++++++++++++++++++++++++++--
 drivers/acpi/button.c          |   18 +++-
 drivers/acpi/ec.c              |    5 -
 drivers/acpi/wakeup.c          |   57 +++-----------
 include/acpi/acpixf.h          |    8 ++
 include/acpi/actypes.h         |   32 ++------
 11 files changed, 197 insertions(+), 398 deletions(-)
Signature · 1 line
Matthew Garrett | [email protected]