summaryrefslogtreecommitdiff
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorsravanM <Sravan@mindtribe.com>2016-02-11 10:49:06 -0800
committerEvan Wilson <evan@oliodevices.com>2016-04-19 17:12:56 -0700
commit07957bd97bf8ac4b079f3bb56f80a0ef534fb743 (patch)
tree3cf12de069ff9ca1d7b0700818b8bde80b2dacbb /include/linux/suspend.h
parentcaa29d028f035240ddd65ace28e5b5f24a6ce26a (diff)
downloadolio-linux-3.10-07957bd97bf8ac4b079f3bb56f80a0ef534fb743.tar.xz
olio-linux-3.10-07957bd97bf8ac4b079f3bb56f80a0ef534fb743.zip
adding in suspend_again
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index d4e3f16d5e8..9c26477f9d0 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -364,6 +364,31 @@ extern bool pm_get_wakeup_count(unsigned int *count, bool block);
extern bool pm_save_wakeup_count(unsigned int count);
extern void pm_wakep_autosleep_enabled(bool set);
+
+/**
+ * struct suspend_again_ops - suspend again support
+ *
+ * Any driver can register suspend_again_ops,
+ * so that they can respond to a suspend_again() check
+ *
+ * suspend_again() is registered at the platform level, so every platform must implement the register function
+ *
+ * @data_ptr: a pointer to data needed by the suspend again check
+ *
+ * @suspend_again_check: Function called by the platform suspend_again() function to check for suspend_again
+ */
+struct suspend_again_ops {
+ void *data_ptr;
+ bool (*suspend_again_check)(void *data);
+};
+
+
+#ifdef CONFIG_PM_SUSPEND_AGAIN_OPS
+extern void pm_register_suspend_again_ops(struct suspend_again_ops const *ops);
+#else
+static inline void pm_register_suspend_again_ops(struct suspend_again_ops const *ops) {}
+#endif
+
static inline void lock_system_sleep(void)
{
current->flags |= PF_FREEZER_SKIP;