aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 512e09177e57..3160648ccdda 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -460,6 +460,7 @@ struct dev_pm_info {
460 unsigned long active_jiffies; 460 unsigned long active_jiffies;
461 unsigned long suspended_jiffies; 461 unsigned long suspended_jiffies;
462 unsigned long accounting_timestamp; 462 unsigned long accounting_timestamp;
463 void *subsys_data; /* Owned by the subsystem. */
463#endif 464#endif
464}; 465};
465 466
@@ -529,21 +530,17 @@ struct dev_power_domain {
529 */ 530 */
530 531
531#ifdef CONFIG_PM_SLEEP 532#ifdef CONFIG_PM_SLEEP
532#ifndef CONFIG_ARCH_NO_SYSDEV_OPS
533extern int sysdev_suspend(pm_message_t state);
534extern int sysdev_resume(void);
535#else
536static inline int sysdev_suspend(pm_message_t state) { return 0; }
537static inline int sysdev_resume(void) { return 0; }
538#endif
539
540extern void device_pm_lock(void); 533extern void device_pm_lock(void);
541extern void dpm_resume_noirq(pm_message_t state); 534extern void dpm_resume_noirq(pm_message_t state);
542extern void dpm_resume_end(pm_message_t state); 535extern void dpm_resume_end(pm_message_t state);
536extern void dpm_resume(pm_message_t state);
537extern void dpm_complete(pm_message_t state);
543 538
544extern void device_pm_unlock(void); 539extern void device_pm_unlock(void);
545extern int dpm_suspend_noirq(pm_message_t state); 540extern int dpm_suspend_noirq(pm_message_t state);
546extern int dpm_suspend_start(pm_message_t state); 541extern int dpm_suspend_start(pm_message_t state);
542extern int dpm_suspend(pm_message_t state);
543extern int dpm_prepare(pm_message_t state);
547 544
548extern void __suspend_report_result(const char *function, void *fn, int ret); 545extern void __suspend_report_result(const char *function, void *fn, int ret);
549 546
@@ -553,6 +550,16 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
553 } while (0) 550 } while (0)
554 551
555extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); 552extern int device_pm_wait_for_dev(struct device *sub, struct device *dev);
553
554extern int pm_generic_prepare(struct device *dev);
555extern int pm_generic_suspend(struct device *dev);
556extern int pm_generic_resume(struct device *dev);
557extern int pm_generic_freeze(struct device *dev);
558extern int pm_generic_thaw(struct device *dev);
559extern int pm_generic_restore(struct device *dev);
560extern int pm_generic_poweroff(struct device *dev);
561extern void pm_generic_complete(struct device *dev);
562
556#else /* !CONFIG_PM_SLEEP */ 563#else /* !CONFIG_PM_SLEEP */
557 564
558#define device_pm_lock() do {} while (0) 565#define device_pm_lock() do {} while (0)
@@ -569,6 +576,15 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b)
569{ 576{
570 return 0; 577 return 0;
571} 578}
579
580#define pm_generic_prepare NULL
581#define pm_generic_suspend NULL
582#define pm_generic_resume NULL
583#define pm_generic_freeze NULL
584#define pm_generic_thaw NULL
585#define pm_generic_restore NULL
586#define pm_generic_poweroff NULL
587#define pm_generic_complete NULL
572#endif /* !CONFIG_PM_SLEEP */ 588#endif /* !CONFIG_PM_SLEEP */
573 589
574/* How to reorder dpm_list after device_move() */ 590/* How to reorder dpm_list after device_move() */
@@ -579,11 +595,4 @@ enum dpm_order {
579 DPM_ORDER_DEV_LAST, 595 DPM_ORDER_DEV_LAST,
580}; 596};
581 597
582extern int pm_generic_suspend(struct device *dev);
583extern int pm_generic_resume(struct device *dev);
584extern int pm_generic_freeze(struct device *dev);
585extern int pm_generic_thaw(struct device *dev);
586extern int pm_generic_restore(struct device *dev);
587extern int pm_generic_poweroff(struct device *dev);
588
589#endif /* _LINUX_PM_H */ 598#endif /* _LINUX_PM_H */