summaryrefslogtreecommitdiffstats
path: root/Documentation/kernel-hacking
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-04-03 17:48:33 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-04-04 19:45:18 +0200
commitddfd9dcf270ce23ed1985b66fcfa163920e2e1b8 (patch)
tree63973af7b8388c2e035a3a453ba41d93a5281d7c /Documentation/kernel-hacking
parent2ce94bc4e056d3e48291aac87a95ebd2a86348ba (diff)
downloadlinux-stable-ddfd9dcf270ce23ed1985b66fcfa163920e2e1b8.tar.gz
linux-stable-ddfd9dcf270ce23ed1985b66fcfa163920e2e1b8.tar.bz2
linux-stable-ddfd9dcf270ce23ed1985b66fcfa163920e2e1b8.zip
ACPI: PM: Add acpi_[un]register_wakeup_handler()
Since commit fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system") the SCI triggering without there being a wakeup cause recognized by the ACPI sleep code will no longer wakeup the system. This works as intended, but this is a problem for devices where the SCI is shared with another device which is also a wakeup source. In the past these, from the pov of the ACPI sleep code, spurious SCIs would still cause a wakeup so the wakeup from the device sharing the interrupt would actually wakeup the system. This now no longer works. This is a problem on e.g. Bay Trail-T and Cherry Trail devices where some peripherals (typically the XHCI controller) can signal a Power Management Event (PME) to the Power Management Controller (PMC) to wakeup the system, this uses the same interrupt as the SCI. These wakeups are handled through a special INT0002 ACPI device which checks for events in the GPE0a_STS for this and takes care of acking the PME so that the shared interrupt stops triggering. The change to the ACPI sleep code to ignore the spurious SCI, causes the system to no longer wakeup on these PME events. To make things worse this means that the INT0002 device driver interrupt handler will no longer run, causing the PME to not get cleared and resulting in the system hanging. Trying to wakeup the system after such a PME through e.g. the power button no longer works. Add an acpi_register_wakeup_handler() function which registers a handler to be called from acpi_s2idle_wake() and when the handler returns true, return true from acpi_s2idle_wake(). The INT0002 driver will use this mechanism to check the GPE0a_STS register from acpi_s2idle_wake() and to tell the system to wakeup if a PME is signaled in the register. Fixes: fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system") Cc: 5.4+ <stable@vger.kernel.org> # 5.4+ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/kernel-hacking')
0 files changed, 0 insertions, 0 deletions