]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/pm.h
PM: Handle device registrations during suspend/resume
[linux-2.6-omap-h63xx.git] / include / linux / pm.h
index b78e0295adf4342732b42d8ffd588a48771e2b79..e6b9f29e27d7c8a0bf88a7fde3856b83335762d7 100644 (file)
@@ -95,7 +95,7 @@ struct pm_dev
 };
 
 /* Functions above this comment are list-based old-style power
- * managment. Please avoid using them.  */
+ * management. Please avoid using them.  */
 
 /*
  * Callbacks for platform drivers to implement.
@@ -143,6 +143,9 @@ typedef struct pm_message {
  *             the upcoming system state (such as PCI_D3hot), and enable
  *             wakeup events as appropriate.
  *
+ * HIBERNATE   Enter a low power device state appropriate for the hibernation
+ *             state (eg. ACPI S4) and enable wakeup events as appropriate.
+ *
  * FREEZE      Quiesce operations so that a consistent image can be saved;
  *             but do NOT otherwise enter a low power device state, and do
  *             NOT emit system wakeup events.
@@ -166,16 +169,21 @@ typedef struct pm_message {
 #define PM_EVENT_ON 0
 #define PM_EVENT_FREEZE 1
 #define PM_EVENT_SUSPEND 2
-#define PM_EVENT_PRETHAW 3
+#define PM_EVENT_HIBERNATE 4
+#define PM_EVENT_PRETHAW 8
+
+#define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
 
 #define PMSG_FREEZE    ((struct pm_message){ .event = PM_EVENT_FREEZE, })
 #define PMSG_PRETHAW   ((struct pm_message){ .event = PM_EVENT_PRETHAW, })
 #define PMSG_SUSPEND   ((struct pm_message){ .event = PM_EVENT_SUSPEND, })
+#define PMSG_HIBERNATE ((struct pm_message){ .event = PM_EVENT_HIBERNATE, })
 #define PMSG_ON                ((struct pm_message){ .event = PM_EVENT_ON, })
 
 struct dev_pm_info {
        pm_message_t            power_state;
        unsigned                can_wakeup:1;
+       bool                    sleeping:1;     /* Owned by the PM core */
 #ifdef CONFIG_PM_SLEEP
        unsigned                should_wakeup:1;
        struct list_head        entry;