diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-27 07:42:42 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-27 07:42:42 -0500 |
commit | 45c36462aef0cccadb7755ea4edc78d13334a2be (patch) | |
tree | d707b2863494452585941d3818347005f34c636e /include/linux/acpi.h | |
parent | c4e050376c69bb9d67895842665264df2a2004d9 (diff) | |
parent | b88ce2a41562d1a9554f209e0f31a32d9f473794 (diff) |
Merge branch 'acpi-dev-pm' into acpi-enumeration
Subsequent commits in this branch will depend on 'acpi-dev-pm'
material.
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 32fbc4e73a56..3574e4a2bf14 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/errno.h> | ||
28 | #include <linux/ioport.h> /* for struct resource */ | 29 | #include <linux/ioport.h> /* for struct resource */ |
29 | #include <linux/device.h> | 30 | #include <linux/device.h> |
30 | 31 | ||
@@ -478,4 +479,41 @@ acpi_status acpi_os_prepare_sleep(u8 sleep_state, | |||
478 | #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) | 479 | #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) |
479 | #endif | 480 | #endif |
480 | 481 | ||
482 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM_RUNTIME) | ||
483 | int acpi_dev_runtime_suspend(struct device *dev); | ||
484 | int acpi_dev_runtime_resume(struct device *dev); | ||
485 | int acpi_subsys_runtime_suspend(struct device *dev); | ||
486 | int acpi_subsys_runtime_resume(struct device *dev); | ||
487 | #else | ||
488 | static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } | ||
489 | static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } | ||
490 | static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } | ||
491 | static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } | ||
492 | #endif | ||
493 | |||
494 | #ifdef CONFIG_ACPI_SLEEP | ||
495 | int acpi_dev_suspend_late(struct device *dev); | ||
496 | int acpi_dev_resume_early(struct device *dev); | ||
497 | int acpi_subsys_prepare(struct device *dev); | ||
498 | int acpi_subsys_suspend_late(struct device *dev); | ||
499 | int acpi_subsys_resume_early(struct device *dev); | ||
500 | #else | ||
501 | static inline int acpi_dev_suspend_late(struct device *dev) { return 0; } | ||
502 | static inline int acpi_dev_resume_early(struct device *dev) { return 0; } | ||
503 | static inline int acpi_subsys_prepare(struct device *dev) { return 0; } | ||
504 | static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } | ||
505 | static inline int acpi_subsys_resume_early(struct device *dev) { return 0; } | ||
506 | #endif | ||
507 | |||
508 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM) | ||
509 | int acpi_dev_pm_attach(struct device *dev, bool power_on); | ||
510 | int acpi_dev_pm_detach(struct device *dev, bool power_off); | ||
511 | #else | ||
512 | static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) | ||
513 | { | ||
514 | return -ENODEV; | ||
515 | } | ||
516 | static inline void acpi_dev_pm_detach(struct device *dev, bool power_off) {} | ||
517 | #endif | ||
518 | |||
481 | #endif /*_LINUX_ACPI_H*/ | 519 | #endif /*_LINUX_ACPI_H*/ |