aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-27 07:42:42 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-27 07:42:42 -0500
commit45c36462aef0cccadb7755ea4edc78d13334a2be (patch)
treed707b2863494452585941d3818347005f34c636e /include/linux/acpi.h
parentc4e050376c69bb9d67895842665264df2a2004d9 (diff)
parentb88ce2a41562d1a9554f209e0f31a32d9f473794 (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.h38
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)
483int acpi_dev_runtime_suspend(struct device *dev);
484int acpi_dev_runtime_resume(struct device *dev);
485int acpi_subsys_runtime_suspend(struct device *dev);
486int acpi_subsys_runtime_resume(struct device *dev);
487#else
488static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
489static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
490static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
491static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
492#endif
493
494#ifdef CONFIG_ACPI_SLEEP
495int acpi_dev_suspend_late(struct device *dev);
496int acpi_dev_resume_early(struct device *dev);
497int acpi_subsys_prepare(struct device *dev);
498int acpi_subsys_suspend_late(struct device *dev);
499int acpi_subsys_resume_early(struct device *dev);
500#else
501static inline int acpi_dev_suspend_late(struct device *dev) { return 0; }
502static inline int acpi_dev_resume_early(struct device *dev) { return 0; }
503static inline int acpi_subsys_prepare(struct device *dev) { return 0; }
504static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; }
505static inline int acpi_subsys_resume_early(struct device *dev) { return 0; }
506#endif
507
508#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
509int acpi_dev_pm_attach(struct device *dev, bool power_on);
510int acpi_dev_pm_detach(struct device *dev, bool power_off);
511#else
512static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
513{
514 return -ENODEV;
515}
516static 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*/