]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ACPI: EC: Return bool from acpi_ec_dispatch_gpe()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jan 2020 09:40:00 +0000 (10:40 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 14 Feb 2020 10:57:31 +0000 (11:57 +0100)
commitca8d59afd30950146c2372869e7d215af39a0755
tree8435a6baf2076a8c9a1ef3e3c0ca12ddc26fd57a
parent4e962a448d12f32babf80049f0d292d918888b16
ACPI: EC: Return bool from acpi_ec_dispatch_gpe()

BugLink: https://bugs.launchpad.net/bugs/1859407
On some systems, if suspend-to-idle is used, the EC may signal system
wakeup events (power button events, for example) as well as events
that should not cause the system to resume and acpi_ec_dispatch_gpe()
needs to be called to determine whether or not the system should
resume then.  In particular, if acpi_ec_dispatch_gpe() doesn't detect
any EC events at all, the system should remain suspended, so it is
useful to know when that is the case.

For this reason, make acpi_ec_dispatch_gpe() return a bool value
indicating whether or not any EC events have been detected by it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 9089f16e053afc5e18feaeb9f64cc7c90d6bd687)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/acpi/ec.c
drivers/acpi/internal.h