diff options
-rw-r--r-- | drivers/amba/bus.c | 1 | ||||
-rw-r--r-- | drivers/base/platform.c | 1 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 1 | ||||
-rw-r--r-- | drivers/mmc/core/sdio_bus.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi.c | 1 | ||||
-rw-r--r-- | include/linux/pm.h | 11 | ||||
-rw-r--r-- | include/linux/pm_domain.h | 11 |
7 files changed, 16 insertions, 11 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 8f5239377f91..47bbdc1b5be3 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/pm_runtime.h> | 17 | #include <linux/pm_runtime.h> |
18 | #include <linux/pm_domain.h> | ||
18 | #include <linux/amba/bus.h> | 19 | #include <linux/amba/bus.h> |
19 | #include <linux/sizes.h> | 20 | #include <linux/sizes.h> |
20 | 21 | ||
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 904be3dc0908..b2afc29403f9 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/pm_runtime.h> | 23 | #include <linux/pm_runtime.h> |
24 | #include <linux/pm_domain.h> | ||
24 | #include <linux/idr.h> | 25 | #include <linux/idr.h> |
25 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
26 | #include <linux/clk/clk-conf.h> | 27 | #include <linux/clk/clk-conf.h> |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 3cd8f11f1b5f..e61a6c5c3372 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/irqflags.h> | 48 | #include <linux/irqflags.h> |
49 | #include <linux/rwsem.h> | 49 | #include <linux/rwsem.h> |
50 | #include <linux/pm_runtime.h> | 50 | #include <linux/pm_runtime.h> |
51 | #include <linux/pm_domain.h> | ||
51 | #include <linux/acpi.h> | 52 | #include <linux/acpi.h> |
52 | #include <linux/jump_label.h> | 53 | #include <linux/jump_label.h> |
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 1df0fc63c17c..65cf7a7e05ea 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/export.h> | 16 | #include <linux/export.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_runtime.h> |
19 | #include <linux/pm_domain.h> | ||
19 | #include <linux/acpi.h> | 20 | #include <linux/acpi.h> |
20 | 21 | ||
21 | #include <linux/mmc/card.h> | 22 | #include <linux/mmc/card.h> |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 72a0beb1fafa..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> |
diff --git a/include/linux/pm.h b/include/linux/pm.h index c4cbf485a5d6..1022ba1eb4de 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -622,17 +622,6 @@ struct dev_pm_domain { | |||
622 | void (*detach)(struct device *dev, bool power_off); | 622 | void (*detach)(struct device *dev, bool power_off); |
623 | }; | 623 | }; |
624 | 624 | ||
625 | #ifdef CONFIG_PM | ||
626 | extern int dev_pm_domain_attach(struct device *dev, bool power_on); | ||
627 | extern void dev_pm_domain_detach(struct device *dev, bool power_off); | ||
628 | #else | ||
629 | static inline int dev_pm_domain_attach(struct device *dev, bool power_on) | ||
630 | { | ||
631 | return -ENODEV; | ||
632 | } | ||
633 | static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} | ||
634 | #endif | ||
635 | |||
636 | /* | 625 | /* |
637 | * The PM_EVENT_ messages are also used by drivers implementing the legacy | 626 | * The PM_EVENT_ messages are also used by drivers implementing the legacy |
638 | * suspend framework, based on the ->suspend() and ->resume() callbacks common | 627 | * suspend framework, based on the ->suspend() and ->resume() callbacks common |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index ed4f4a79c528..900474317afc 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -301,4 +301,15 @@ static inline int of_genpd_add_provider_onecell(struct device_node *np, | |||
301 | return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data); | 301 | return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data); |
302 | } | 302 | } |
303 | 303 | ||
304 | #ifdef CONFIG_PM | ||
305 | extern int dev_pm_domain_attach(struct device *dev, bool power_on); | ||
306 | extern void dev_pm_domain_detach(struct device *dev, bool power_off); | ||
307 | #else | ||
308 | static inline int dev_pm_domain_attach(struct device *dev, bool power_on) | ||
309 | { | ||
310 | return -ENODEV; | ||
311 | } | ||
312 | static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} | ||
313 | #endif | ||
314 | |||
304 | #endif /* _LINUX_PM_DOMAIN_H */ | 315 | #endif /* _LINUX_PM_DOMAIN_H */ |