diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-26 04:03:06 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-26 04:03:06 -0500 |
commit | b88ce2a41562d1a9554f209e0f31a32d9f473794 (patch) | |
tree | ab9a0509fcc0e5f412cd8eade4a1b6ef5e13e889 /include/linux/acpi.h | |
parent | 1399dfcdfe89898ccd791216f9679ba734aea910 (diff) |
ACPI / PM: Allow attach/detach routines to change device power states
Make it possible to ask the routines used for adding/removing devices
to/from the general ACPI PM domain, acpi_dev_pm_attach() and
acpi_dev_pm_detach(), respectively, to change the power states of
devices so that they are put into the full-power state automatically
by acpi_dev_pm_attach() and into the lowest-power state available
automatically by acpi_dev_pm_detach().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5fdd87271518..28ba643c92c1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -458,11 +458,14 @@ static inline int acpi_subsys_resume_early(struct device *dev) { return 0; } | |||
458 | #endif | 458 | #endif |
459 | 459 | ||
460 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM) | 460 | #if defined(CONFIG_ACPI) && defined(CONFIG_PM) |
461 | int acpi_dev_pm_attach(struct device *dev); | 461 | int acpi_dev_pm_attach(struct device *dev, bool power_on); |
462 | int acpi_dev_pm_detach(struct device *dev); | 462 | int acpi_dev_pm_detach(struct device *dev, bool power_off); |
463 | #else | 463 | #else |
464 | static inline int acpi_dev_pm_attach(struct device *dev) { return -ENODEV; } | 464 | static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) |
465 | static inline void acpi_dev_pm_detach(struct device *dev) {} | 465 | { |
466 | return -ENODEV; | ||
467 | } | ||
468 | static inline void acpi_dev_pm_detach(struct device *dev, bool power_off) {} | ||
466 | #endif | 469 | #endif |
467 | 470 | ||
468 | #endif /*_LINUX_ACPI_H*/ | 471 | #endif /*_LINUX_ACPI_H*/ |