]> err.no Git - linux-2.6/blobdiff - include/linux/pm.h
m68k: remove unused adb.h
[linux-2.6] / include / linux / pm.h
index dfced9188bdcb44ed4ae0ea8743dde1c7fd0cc40..6e8fa3049e5d097fc5f96400350240e5224ca48e 100644 (file)
@@ -114,21 +114,23 @@ typedef int __bitwise suspend_disk_method_t;
 
 /* invalid must be 0 so struct pm_ops initialisers can leave it out */
 #define PM_DISK_INVALID                ((__force suspend_disk_method_t) 0)
-#define        PM_DISK_FIRMWARE        ((__force suspend_disk_method_t) 1)
-#define        PM_DISK_PLATFORM        ((__force suspend_disk_method_t) 2)
-#define        PM_DISK_SHUTDOWN        ((__force suspend_disk_method_t) 3)
-#define        PM_DISK_REBOOT          ((__force suspend_disk_method_t) 4)
-#define        PM_DISK_TEST            ((__force suspend_disk_method_t) 5)
-#define        PM_DISK_TESTPROC        ((__force suspend_disk_method_t) 6)
-#define        PM_DISK_MAX             ((__force suspend_disk_method_t) 7)
+#define        PM_DISK_PLATFORM        ((__force suspend_disk_method_t) 1)
+#define        PM_DISK_SHUTDOWN        ((__force suspend_disk_method_t) 2)
+#define        PM_DISK_REBOOT          ((__force suspend_disk_method_t) 3)
+#define        PM_DISK_TEST            ((__force suspend_disk_method_t) 4)
+#define        PM_DISK_TESTPROC        ((__force suspend_disk_method_t) 5)
+#define        PM_DISK_MAX             ((__force suspend_disk_method_t) 6)
 
 /**
  * struct pm_ops - Callbacks for managing platform dependent suspend states.
  * @valid: Callback to determine whether the given state can be entered.
  *     If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is
- *     always valid and never passed to this call.
- *     If not assigned, all suspend states are advertised as valid
- *     in /sys/power/state (but can still be rejected by prepare or enter.)
+ *     always valid and never passed to this call. If not assigned,
+ *     no suspend states are valid.
+ *     Valid states are advertised in /sys/power/state but can still
+ *     be rejected by prepare or enter if the conditions aren't right.
+ *     There is a %pm_valid_only_mem function available that can be assigned
+ *     to this if you only implement mem sleep.
  *
  * @prepare: Prepare the platform for the given suspend state. Can return a
  *     negative error code if necessary.
@@ -166,6 +168,7 @@ extern void pm_set_ops(struct pm_ops *pm_ops);
 extern struct pm_ops *pm_ops;
 extern int pm_suspend(suspend_state_t state);
 
+extern int pm_valid_only_mem(suspend_state_t state);
 
 /**
  * arch_suspend_disable_irqs - disable IRQs for suspend
@@ -329,7 +332,7 @@ static inline void dpm_runtime_resume(struct device * dev)
 
 static inline int call_platform_enable_wakeup(struct device *dev, int is_on)
 {
-       return -EIO;
+       return 0;
 }
 
 #endif