linux/drivers/acpi
Rafael J. Wysocki 3487972d7f PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume()
Middle-layer code doing suspend-time optimizations for devices with
the DPM_FLAG_SMART_SUSPEND flag set (currently, the PCI bus type and
the ACPI PM domain) needs to make the core skip ->thaw_early and
->thaw callbacks for those devices in some cases and it sets the
power.direct_complete flag for them for this purpose.

However, it turns out that setting power.direct_complete outside of
the PM core is a bad idea as it triggers an excess invocation of
pm_runtime_enable() in device_resume().

For this reason, provide a helper to clear power.is_late_suspended
and power.is_suspended to be invoked by the middle-layer code in
question instead of setting power.direct_complete and make that code
call the new helper.

Fixes: c4b65157ae (PCI / PM: Take SMART_SUSPEND driver flag into account)
Fixes: 05087360fd (ACPI / PM: Take SMART_SUSPEND driver flag into account)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2017-12-11 14:32:56 +01:00
..
acpica Merge branch 'acpica' 2017-11-13 01:36:58 +01:00
apei ACPI updates for v4.15-rc1 2017-11-13 20:08:22 -08:00
arm64 arm64 updates for 4.15 2017-11-15 10:56:56 -08:00
dptf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfit libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
pmic - New Drivers 2017-11-16 09:15:57 -08:00
x86 ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions 2017-10-21 13:24:53 +02:00
Kconfig - New Drivers 2017-11-16 09:15:57 -08:00
Makefile - New Drivers 2017-11-16 09:15:57 -08:00
ac.c ACPI: Mark expected switch fall-throughs 2017-11-09 00:55:16 +01:00
acpi_amba.c
acpi_apd.c ACPI / APD: Add clock frequency for ThunderX2 I2C controller 2017-10-17 23:52:54 +02:00
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: make config_item_type const 2017-10-19 16:15:29 +02:00
acpi_dbg.c
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI / LPIT: Add Low Power Idle Table (LPIT) support 2017-10-11 15:38:10 +02:00
acpi_lpss.c ACPI updates for v4.15-rc1 2017-11-13 20:08:22 -08:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c ACPI: Mark expected switch fall-throughs 2017-11-09 00:55:16 +01:00
acpi_video.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
acpi_watchdog.c ACPI / watchdog: properly initialize resources 2017-09-19 01:49:02 +02:00
battery.c
battery.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bgrt.c
blacklist.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
bus.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
button.c Modules updates for v4.15 2017-11-15 13:46:33 -08:00
cm_sbs.c
container.c
cppc_acpi.c ACPI / CPPC: Fix KASAN global out of bounds warning 2017-12-05 23:25:49 +01:00
custom_method.c
debugfs.c
device_pm.c PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume() 2017-12-11 14:32:56 +01:00
device_sysfs.c ACPI / bus: Leave modalias empty for devices which are not present 2017-11-20 23:48:51 +01:00
dock.c ACPI: Mark expected switch fall-throughs 2017-11-09 00:55:16 +01:00
ec.c Merge branch 'acpi-ec' into acpi 2017-11-30 13:37:29 +01:00
ec_sys.c
event.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
evged.c
fan.c
glue.c
hed.c
internal.h Merge branch 'acpi-ec' into acpi 2017-11-30 13:37:29 +01:00
ioapic.c
irq.c
numa.c
nvs.c
osi.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
osl.c ACPI / LPIT: Add Low Power Idle Table (LPIT) support 2017-10-11 15:38:10 +02:00
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
power.c
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_core.c
processor_driver.c
processor_idle.c Revert "x86/mm: Stop calling leave_mm() in idle code" 2017-11-04 15:01:50 +01:00
processor_pdc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_perflib.c
processor_thermal.c
processor_throttling.c
property.c ACPI: properties: Fix __acpi_node_get_property_reference() return codes 2017-10-11 21:16:37 +02:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
resource.c ACPI: Mark expected switch fall-throughs 2017-11-09 00:55:16 +01:00
sbs.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sbshc.c
sbshc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scan.c Merge branch 'acpi-ec' into acpi 2017-11-30 13:37:29 +01:00
sleep.c ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360 2017-11-06 23:56:57 +01:00
sleep.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spcr.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sysfs.c Modules updates for v4.15 2017-11-15 13:46:33 -08:00
tables.c
thermal.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
utils.c ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path 2017-11-14 12:54:55 +01:00
video_detect.c
wakeup.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00