diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-03 01:34:53 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-10 00:48:25 +0100 |
commit | 8425ec7faff005500aad89b9fc00e5ba91ac57b9 (patch) | |
tree | 2b5c39e99644fe94e6b0d9bab586490e42817ee5 /drivers/mfd/intel-lpss.c | |
parent | PCI / PM: Use SMART_SUSPEND and LEAVE_SUSPENDED flags for PCIe ports (diff) | |
download | linux-8425ec7faff005500aad89b9fc00e5ba91ac57b9.tar.xz linux-8425ec7faff005500aad89b9fc00e5ba91ac57b9.zip |
PM / mfd: intel-lpss: Use DPM_FLAG_SMART_SUSPEND
Make the intel-lpss driver set DPM_FLAG_SMART_SUSPEND for its
devices which will allow them to stay in runtime suspend during
system suspend unless they need to be reconfigured for some reason.
Also make it avoid resuming its child devices if they have
DPM_FLAG_SMART_SUSPEND set to allow them to remain in runtime
suspend during system suspend.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Diffstat (limited to 'drivers/mfd/intel-lpss.c')
-rw-r--r-- | drivers/mfd/intel-lpss.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index 0e0ab9bb1530..9e545eb6e8b4 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -450,6 +450,8 @@ int intel_lpss_probe(struct device *dev, if (ret) goto err_remove_ltr; + dev_pm_set_driver_flags(dev, DPM_FLAG_SMART_SUSPEND); + return 0; err_remove_ltr: @@ -478,7 +480,9 @@ EXPORT_SYMBOL_GPL(intel_lpss_remove); static int resume_lpss_device(struct device *dev, void *data) { - pm_runtime_resume(dev); + if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND)) + pm_runtime_resume(dev); + return 0; } |