aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-10-06 19:18:12 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-10-06 19:18:12 -0400
commit49a09c9ab012017c4673b86dbb28c616cf8f2381 (patch)
tree9cdc84a6b837268060bfad89d5bd43032dc0fd74 /drivers/spi
parent28c399e2a1ed03bd175858deef1e233317103089 (diff)
parentf39cb1797ec1094b196d3dab44a7ca6060813d38 (diff)
Merge branch 'pm-domains'
* pm-domains: (32 commits) PM / Domains: Rename cpu_data to cpuidle_data PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h PM / Domains: Remove legacy API for adding devices through DT PM / Domains: Add genpd attach/detach callbacks PM / Domains: add debugfs listing of struct generic_pm_domain-s ACPI / PM: Convert acpi_dev_pm_detach() into a static function ARM: exynos: Move to generic PM domain DT bindings amba: Add support for attach/detach of PM domains spi: core: Convert to dev_pm_domain_attach|detach() mmc: sdio: Convert to dev_pm_domain_attach|detach() i2c: core: Convert to dev_pm_domain_attach|detach() drivercore / platform: Convert to dev_pm_domain_attach|detach() PM / Domains: Add APIs to attach/detach a PM domain for a device PM / Domains: Add generic OF-based PM domain look-up ACPI / PM: Assign the ->detach() callback when attaching the PM domain PM / Domains: Add a detach callback to the struct dev_pm_domain PM / domains: Spelling s/domian/domain/ PM / domains: Keep declaration of dev_power_governors together PM / domains: Remove default_stop_ok() API drivers: sh: Leave disabling of unused PM domains to genpd ...
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ca935df80c88..3907f1493e7d 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -35,6 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/of_gpio.h> 36#include <linux/of_gpio.h>
37#include <linux/pm_runtime.h> 37#include <linux/pm_runtime.h>
38#include <linux/pm_domain.h>
38#include <linux/export.h> 39#include <linux/export.h>
39#include <linux/sched/rt.h> 40#include <linux/sched/rt.h>
40#include <linux/delay.h> 41#include <linux/delay.h>
@@ -264,10 +265,12 @@ static int spi_drv_probe(struct device *dev)
264 if (ret) 265 if (ret)
265 return ret; 266 return ret;
266 267
267 acpi_dev_pm_attach(dev, true); 268 ret = dev_pm_domain_attach(dev, true);
268 ret = sdrv->probe(to_spi_device(dev)); 269 if (ret != -EPROBE_DEFER) {
269 if (ret) 270 ret = sdrv->probe(to_spi_device(dev));
270 acpi_dev_pm_detach(dev, true); 271 if (ret)
272 dev_pm_domain_detach(dev, true);
273 }
271 274
272 return ret; 275 return ret;
273} 276}
@@ -278,7 +281,7 @@ static int spi_drv_remove(struct device *dev)
278 int ret; 281 int ret;
279 282
280 ret = sdrv->remove(to_spi_device(dev)); 283 ret = sdrv->remove(to_spi_device(dev));
281 acpi_dev_pm_detach(dev, true); 284 dev_pm_domain_detach(dev, true);
282 285
283 return ret; 286 return ret;
284} 287}