diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:09:48 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:09:48 +0000 |
commit | b732ba26602e131b9849ad171080e6871b4faa06 (patch) | |
tree | 7c27424e350e8a1ed5b96cbb96ed6b06417daa29 | |
parent | 49114d782771cc13875fdba3858ed59067a9a9b4 (diff) |
fix-pcf50633-add-back-gratuitous-isr-work-call-in-resume.patch
Sean McNeil reports that he doesn't get pcf50633 interrupts any
more after resume. This adds back the call to ISR work in
the resume, removal of which is probably to do with it.
Signed-off-by: Andy Green <andy@openmoko.com>
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 3bc9fa78a0f..4002c03aca3 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -2467,6 +2467,16 @@ static int pcf50633_resume(struct device *dev) mutex_unlock(&pcf->lock); + /* gratuitous call to PCF work function, in the case that the PCF + * interrupt edge was missed during resume, this forces the pending + * register clear and lifts the interrupt back high again. In the + * case nothing is waiting for service, no harm done. + */ + + get_device(&pcf->client.dev); + if (!schedule_work(&pcf->work) && !pcf->working) + dev_err(&pcf->client.dev, "resume work item may be lost\n"); + callback_all_resume_dependencies(&pcf->resume_dependency); return 0; |