summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuchi Kandoi2015-05-13 16:57:08 -0500
committerAdam Lesinski2015-06-25 15:15:22 -0500
commitd3027d85f30a13d03e2c58c009215bf0b48f9ac9 (patch)
treed253aac259a7893e97b111c3473cd7bbe037794d /libsuspend/include
parent3c2086dabdb87e027412bb4405279128a321e184 (diff)
downloadplatform-system-core-d3027d85f30a13d03e2c58c009215bf0b48f9ac9.tar.gz
platform-system-core-d3027d85f30a13d03e2c58c009215bf0b48f9ac9.tar.xz
platform-system-core-d3027d85f30a13d03e2c58c009215bf0b48f9ac9.zip
Adds a parameter to the wakeup_callback to report sucessful wakeup or suspend aborts.
Adds the call to wakeup_callback when the write to the /sys/power/state fails. This will help userspace account for the suspend aborts. Bug: 17478088 Bug: 18179405 Change-Id: Icd1194cfbaf61044ca0b2fe63a10a4c52e1535bc
Diffstat (limited to 'libsuspend/include')
-rw-r--r--libsuspend/include/suspend/autosuspend.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libsuspend/include/suspend/autosuspend.h b/libsuspend/include/suspend/autosuspend.h
index 10e3d27d2..59188a804 100644
--- a/libsuspend/include/suspend/autosuspend.h
+++ b/libsuspend/include/suspend/autosuspend.h
@@ -18,6 +18,7 @@
18#define _LIBSUSPEND_AUTOSUSPEND_H_ 18#define _LIBSUSPEND_AUTOSUSPEND_H_
19 19
20#include <sys/cdefs.h> 20#include <sys/cdefs.h>
21#include <stdbool.h>
21 22
22__BEGIN_DECLS 23__BEGIN_DECLS
23 24
@@ -46,9 +47,11 @@ int autosuspend_disable(void);
46/* 47/*
47 * set_wakeup_callback 48 * set_wakeup_callback
48 * 49 *
49 * Set a function to be called each time the device wakes up from suspend. 50 * Set a function to be called each time the device returns from suspend.
51 * success is true if the suspend was sucessful and false if the suspend
52 * aborted due to some reason.
50 */ 53 */
51void set_wakeup_callback(void (*func)(void)); 54void set_wakeup_callback(void (*func)(bool success));
52 55
53__END_DECLS 56__END_DECLS
54 57