From b0b262c9a3e14f4459c36eb4bf242a57ee45c27c Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Thu, 29 Jan 2009 14:28:03 +0000 Subject: Update Kernel core files Update kernel core files to support android suspend/resume. These change are conditioned by ifdef Signed-off-by: michael --- kernel/power/power.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'kernel/power/power.h') diff --git a/kernel/power/power.h b/kernel/power/power.h index 46b5ec7a3af..7e377394adf 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -223,3 +223,32 @@ static inline void suspend_thaw_processes(void) { } #endif + +#ifdef CONFIG_ANDROID_WAKELOCK +/* kernel/power/wakelock.c */ +extern struct workqueue_struct *suspend_work_queue; +extern struct wake_lock main_wake_lock; +extern suspend_state_t requested_suspend_state; +#endif + +#ifdef CONFIG_ANDROID_USER_WAKELOCK +ssize_t wake_lock_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf); +ssize_t wake_lock_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t n); +ssize_t wake_full_lock_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t n); + +#define wake_full_lock_show wake_lock_show + +ssize_t wake_unlock_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf); +ssize_t wake_unlock_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t n); +#endif + +#ifdef CONFIG_ANDROID_EARLYSUSPEND +/* kernel/power/earlysuspend.c */ +void request_suspend_state(suspend_state_t state); +suspend_state_t get_suspend_state(void); +#endif -- cgit v1.2.3