diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-31 11:05:33 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-08-08 11:25:30 +0200 |
commit | fcd0a04267ac7c5d5f9a27d2af824270f2091760 (patch) | |
tree | 019c76df3cd9c2e53f08bcc0c96cafab568b496c /drivers/acpi/ec.c | |
parent | 068b47d0984b8756ae71702a1a87aa226cb72fe8 (diff) | |
download | lwn-fcd0a04267ac7c5d5f9a27d2af824270f2091760.tar.gz lwn-fcd0a04267ac7c5d5f9a27d2af824270f2091760.zip |
ACPI: PM: s2idle: Switch EC over to polling during "noirq" suspend
Since the ACPI SCI is set up for system wakeup before the "noirq"
suspend of devices, it is better to make suspend-to-idle follow
suspend-to-RAM (S3) and switch over the EC to polling during "noirq"
suspend (and back to interrupt-based flow during "noirq" resume).
The frequency of spurious wakeup interrupts from the EC may be
reduced this way.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index b996ca5f253f..5a38409114d8 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1958,8 +1958,7 @@ static int acpi_ec_suspend_noirq(struct device *dev) ec->reference_count >= 1) acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); - if (acpi_sleep_no_ec_events()) - acpi_ec_enter_noirq(ec); + acpi_ec_enter_noirq(ec); return 0; } @@ -1968,8 +1967,7 @@ static int acpi_ec_resume_noirq(struct device *dev) { struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev)); - if (acpi_sleep_no_ec_events()) - acpi_ec_leave_noirq(ec); + acpi_ec_leave_noirq(ec); if (ec_no_wakeup && test_bit(EC_FLAGS_STARTED, &ec->flags) && ec->reference_count >= 1) |