aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:46 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:46 +0000
commit2204d8b104b812411a39118ffb436dfbd479787a (patch)
treec44cf815b492a2b81717947a4836a264692bb440 /include/linux
parentd4f8c947ca4693e5a08c252bcd2f0bb6d1e99592 (diff)
add-use-pcf50633-resume-callback-jbt6k74.patch
Adds the resume callback stuff to glamo, then changes jbt6k74 to no longer use a sleeping workqueue, but to make its resume actions dependent on pcf50633 and glamo resume (for backlight and communication to LCM respectively) Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/glamofb.h3
-rw-r--r--include/linux/jbt6k74.h4
-rw-r--r--include/linux/pcf50633.h2
-rw-r--r--include/linux/resume-dependency.h10
4 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/glamofb.h b/include/linux/glamofb.h
index 51bf5932a97..bb4ed0afcc9 100644
--- a/include/linux/glamofb.h
+++ b/include/linux/glamofb.h
@@ -2,6 +2,7 @@
#define _LINUX_GLAMOFB_H
#include <linux/spi/glamo.h>
+#include <linux/resume-dependency.h>
struct glamofb_val {
unsigned int defval;
@@ -36,5 +37,7 @@ struct glamofb_platform_data {
int glamofb_cmd_mode(struct glamofb_handle *gfb, int on);
int glamofb_cmd_write(struct glamofb_handle *gfb, u_int16_t val);
void glamo_lcm_reset(int level);
+extern void
+glamo_register_resume_dependency(struct resume_dependency * resume_dependency);
#endif
diff --git a/include/linux/jbt6k74.h b/include/linux/jbt6k74.h
index 0ac91241f08..f0eaf398b13 100644
--- a/include/linux/jbt6k74.h
+++ b/include/linux/jbt6k74.h
@@ -1,9 +1,13 @@
#ifndef __JBT6K74_H__
#define __JBT6K74_H__
+#include <linux/spi/spi.h>
+
struct jbt6k74_platform_data {
void (*reset)(int devindex, int level);
void (*resuming)(int devindex); /* called when LCM is resumed */
+ void (*suspending)(int devindex, struct spi_device *spi);
+ int (*all_dependencies_resumed)(int devindex);
};
#endif
diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h
index 2bef616ec2d..8a75b28606f 100644
--- a/include/linux/pcf50633.h
+++ b/include/linux/pcf50633.h
@@ -127,7 +127,7 @@ pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf);
extern void
pcf50633_register_resume_dependency(struct pcf50633_data *pcf,
- struct pcf50633_resume_dependency *dep);
+ struct resume_dependency *dep);
#define PCF50633_FEAT_EXTON 0x00000001 /* not yet supported */
diff --git a/include/linux/resume-dependency.h b/include/linux/resume-dependency.h
index b13aa3e2b0e..e0c0f33e2c3 100644
--- a/include/linux/resume-dependency.h
+++ b/include/linux/resume-dependency.h
@@ -38,7 +38,7 @@ struct resume_dependency {
*/
#define init_resume_dependency_list(_head) \
- INIT_LIST_HEAD(&_head.list);
+ INIT_LIST_HEAD(&(_head)->list);
/* if your resume function depends on something else being resumed first, you
@@ -48,8 +48,8 @@ struct resume_dependency {
*/
#define register_resume_dependency(_head, _dep) { \
- _dep->called_flag = 0; \
- list_add(&_dep->list, &_head->list); \
+ (_dep)->called_flag = 0; \
+ list_add(&(_dep)->list, &(_head)->list); \
}
/* In the resume function that things can be dependent on, at the end you
@@ -61,10 +61,10 @@ struct resume_dependency {
struct list_head *_pos, *_q; \
struct resume_dependency *_dep; \
\
- list_for_each_safe(pos, _q, &_head.list) { \
+ list_for_each_safe(_pos, _q, &((_head)->list)) { \
_dep = list_entry(_pos, struct resume_dependency, list); \
_dep->called_flag = 1; \
- (_dep->callback)(dep->context); \
+ (_dep->callback)(_dep->context); \
list_del(_pos); \
} \
}