aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
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 /drivers/i2c
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 'drivers/i2c')
-rw-r--r--drivers/i2c/chips/pcf50633.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
index e477cd7fa32..e5ffeff711d 100644
--- a/drivers/i2c/chips/pcf50633.c
+++ b/drivers/i2c/chips/pcf50633.c
@@ -1928,7 +1928,7 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind)
pcf50633_global = data;
- init_resume_dependency_list(data->resume_dependency);
+ init_resume_dependency_list(&data->resume_dependency);
populate_sysfs_group(data);
@@ -2143,11 +2143,11 @@ int pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf)
*/
void pcf50633_register_resume_dependency(struct pcf50633_data *pcf,
- struct pcf50633_resume_dependency *dep)
+ struct resume_dependency *dep)
{
- register_resume_dependency(pcf->resume_dependency, dep);
+ register_resume_dependency(&pcf->resume_dependency, dep);
}
-EXPORT_SYMBOL_GPL(pcf50633_register_resume_dep);
+EXPORT_SYMBOL_GPL(pcf50633_register_resume_dependency);
static int pcf50633_suspend(struct device *dev, pm_message_t state)
@@ -2240,9 +2240,6 @@ static int pcf50633_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct pcf50633_data *pcf = i2c_get_clientdata(client);
int i;
- struct list_head *pos, *q;
- struct pcf50633_resume_dependency *dep;
-
mutex_lock(&pcf->lock);
@@ -2270,10 +2267,6 @@ static int pcf50633_resume(struct device *dev)
__reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.ledout);
__reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena);
__reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.leddim);
- } else { /* force backlight down, platform will restore later */
- __reg_write(pcf, PCF50633_REG_LEDOUT, 2);
- __reg_write(pcf, PCF50633_REG_LEDENA, 0x20);
- __reg_write(pcf, PCF50633_REG_LEDDIM, 1);
}
/* FIXME: one big read? */
@@ -2287,7 +2280,7 @@ static int pcf50633_resume(struct device *dev)
pcf50633_irq(pcf->irq, pcf);
- callback_all_resume_dependencies(pcf->resume_dependency);
+ callback_all_resume_dependencies(&pcf->resume_dependency);
return 0;
}