mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 09:54:42 +03:00

ACPICA uses reference counters to avoid disabling GPEs too early in case they have been enabled for many times. This is done separately for run time and for wakeup, but the wakeup GPE reference counter is not really necessary, because GPEs are only enabled to wake up the system at the hardware level by acpi_enter_sleep_state(). Thus it only is necessary to set the corresponding bits in the wakeup enable masks of these GPEs' registers right before the system enters a sleep state. Moreover, the GPE wakeup enable bits can only be set when the target sleep state of the system is known and they need to be cleared immediately after wakeup regardless of how many wakeup devices are associated with a given GPE. On the basis of the above observations, introduce function acpi_gpe_wakeup() to be used for setting or clearing the enable bit corresponding to a given GPE in its enable register's enable_for_wake mask. Rafael J. Wysocki
Description
No description provided
Languages
ASL
68.6%
C
29%
Yacc
0.8%
HTML
0.5%
Shell
0.5%
Other
0.6%