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.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 492ed473ba7e..e723b78d8357 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -556,9 +556,10 @@ struct pm_subsys_data {
556 * These flags can be set by device drivers at the probe time. They need not be 556 * These flags can be set by device drivers at the probe time. They need not be
557 * cleared by the drivers as the driver core will take care of that. 557 * cleared by the drivers as the driver core will take care of that.
558 * 558 *
559 * NEVER_SKIP: Do not skip system suspend/resume callbacks for the device. 559 * NEVER_SKIP: Do not skip all system suspend/resume callbacks for the device.
560 * SMART_PREPARE: Check the return value of the driver's ->prepare callback. 560 * SMART_PREPARE: Check the return value of the driver's ->prepare callback.
561 * SMART_SUSPEND: No need to resume the device from runtime suspend. 561 * SMART_SUSPEND: No need to resume the device from runtime suspend.
562 * LEAVE_SUSPENDED: Avoid resuming the device during system resume if possible.
562 * 563 *
563 * Setting SMART_PREPARE instructs bus types and PM domains which may want 564 * Setting SMART_PREPARE instructs bus types and PM domains which may want
564 * system suspend/resume callbacks to be skipped for the device to return 0 from 565 * system suspend/resume callbacks to be skipped for the device to return 0 from
@@ -572,10 +573,14 @@ struct pm_subsys_data {
572 * necessary from the driver's perspective. It also may cause them to skip 573 * necessary from the driver's perspective. It also may cause them to skip
573 * invocations of the ->suspend_late and ->suspend_noirq callbacks provided by 574 * invocations of the ->suspend_late and ->suspend_noirq callbacks provided by
574 * the driver if they decide to leave the device in runtime suspend. 575 * the driver if they decide to leave the device in runtime suspend.
576 *
577 * Setting LEAVE_SUSPENDED informs the PM core and middle-layer code that the
578 * driver prefers the device to be left in suspend after system resume.
575 */ 579 */
576#define DPM_FLAG_NEVER_SKIP BIT(0) 580#define DPM_FLAG_NEVER_SKIP BIT(0)
577#define DPM_FLAG_SMART_PREPARE BIT(1) 581#define DPM_FLAG_SMART_PREPARE BIT(1)
578#define DPM_FLAG_SMART_SUSPEND BIT(2) 582#define DPM_FLAG_SMART_SUSPEND BIT(2)
583#define DPM_FLAG_LEAVE_SUSPENDED BIT(3)
579 584
580struct dev_pm_info { 585struct dev_pm_info {
581 pm_message_t power_state; 586 pm_message_t power_state;
@@ -597,6 +602,8 @@ struct dev_pm_info {
597 bool wakeup_path:1; 602 bool wakeup_path:1;
598 bool syscore:1; 603 bool syscore:1;
599 bool no_pm_callbacks:1; /* Owned by the PM core */ 604 bool no_pm_callbacks:1; /* Owned by the PM core */
605 unsigned int must_resume:1; /* Owned by the PM core */
606 unsigned int may_skip_resume:1; /* Set by subsystems */
600#else 607#else
601 unsigned int should_wakeup:1; 608 unsigned int should_wakeup:1;
602#endif 609#endif
@@ -766,6 +773,7 @@ extern int pm_generic_poweroff(struct device *dev);
766extern void pm_generic_complete(struct device *dev); 773extern void pm_generic_complete(struct device *dev);
767 774
768extern void dev_pm_skip_next_resume_phases(struct device *dev); 775extern void dev_pm_skip_next_resume_phases(struct device *dev);
776extern bool dev_pm_may_skip_resume(struct device *dev);
769extern bool dev_pm_smart_suspend_and_suspended(struct device *dev); 777extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);
770 778
771#else /* !CONFIG_PM_SLEEP */ 779#else /* !CONFIG_PM_SLEEP */