diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 14:14:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 14:14:36 -0400 |
commit | f46e9913faeebcb6bd29edf795f12b60acbff171 (patch) | |
tree | 1ed8871d0ebd638094d27317de1d8a53712ae15a /include/linux/pm.h | |
parent | 8d91530c5fd7f0b1e8c4ddfea2905e55a178569b (diff) | |
parent | 8d4b9d1bfef117862a2889dec4dac227068544c9 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Runtime: Add runtime PM statistics (v3)
PM / Runtime: Make runtime_status attribute not debug-only (v. 2)
PM: Do not use dynamically allocated objects in pm_wakeup_event()
PM / Suspend: Fix ordering of calls in suspend error paths
PM / Hibernate: Fix snapshot error code path
PM / Hibernate: Fix hibernation_platform_enter()
pm_qos: Get rid of the allocation in pm_qos_add_request()
pm_qos: Reimplement using plists
plist: Add plist_last
PM: Make it possible to avoid races between wakeup and system sleep
PNPACPI: Add support for remote wakeup
PM: describe kernel policy regarding wakeup defaults (v. 2)
PM / Hibernate: Fix typos in comments in kernel/power/swap.c
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 8e258c727971..52e8c55ff314 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -457,6 +457,7 @@ struct dev_pm_info { | |||
457 | #ifdef CONFIG_PM_SLEEP | 457 | #ifdef CONFIG_PM_SLEEP |
458 | struct list_head entry; | 458 | struct list_head entry; |
459 | struct completion completion; | 459 | struct completion completion; |
460 | unsigned long wakeup_count; | ||
460 | #endif | 461 | #endif |
461 | #ifdef CONFIG_PM_RUNTIME | 462 | #ifdef CONFIG_PM_RUNTIME |
462 | struct timer_list suspend_timer; | 463 | struct timer_list suspend_timer; |
@@ -476,9 +477,15 @@ struct dev_pm_info { | |||
476 | enum rpm_request request; | 477 | enum rpm_request request; |
477 | enum rpm_status runtime_status; | 478 | enum rpm_status runtime_status; |
478 | int runtime_error; | 479 | int runtime_error; |
480 | unsigned long active_jiffies; | ||
481 | unsigned long suspended_jiffies; | ||
482 | unsigned long accounting_timestamp; | ||
479 | #endif | 483 | #endif |
480 | }; | 484 | }; |
481 | 485 | ||
486 | extern void update_pm_runtime_accounting(struct device *dev); | ||
487 | |||
488 | |||
482 | /* | 489 | /* |
483 | * The PM_EVENT_ messages are also used by drivers implementing the legacy | 490 | * The PM_EVENT_ messages are also used by drivers implementing the legacy |
484 | * suspend framework, based on the ->suspend() and ->resume() callbacks common | 491 | * suspend framework, based on the ->suspend() and ->resume() callbacks common |
@@ -552,6 +559,11 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
552 | } while (0) | 559 | } while (0) |
553 | 560 | ||
554 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); | 561 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); |
562 | |||
563 | /* drivers/base/power/wakeup.c */ | ||
564 | extern void pm_wakeup_event(struct device *dev, unsigned int msec); | ||
565 | extern void pm_stay_awake(struct device *dev); | ||
566 | extern void pm_relax(void); | ||
555 | #else /* !CONFIG_PM_SLEEP */ | 567 | #else /* !CONFIG_PM_SLEEP */ |
556 | 568 | ||
557 | #define device_pm_lock() do {} while (0) | 569 | #define device_pm_lock() do {} while (0) |
@@ -565,6 +577,10 @@ static inline int dpm_suspend_start(pm_message_t state) | |||
565 | #define suspend_report_result(fn, ret) do {} while (0) | 577 | #define suspend_report_result(fn, ret) do {} while (0) |
566 | 578 | ||
567 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} | 579 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} |
580 | |||
581 | static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {} | ||
582 | static inline void pm_stay_awake(struct device *dev) {} | ||
583 | static inline void pm_relax(void) {} | ||
568 | #endif /* !CONFIG_PM_SLEEP */ | 584 | #endif /* !CONFIG_PM_SLEEP */ |
569 | 585 | ||
570 | /* How to reorder dpm_list after device_move() */ | 586 | /* How to reorder dpm_list after device_move() */ |