1 From d94d0b993494af18025b0980810ddbd44964ad04 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:14 +0100
4 Subject: [PATCH] fix-pcf50633-add-back-gratuitous-isr-work-call-in-resume.patch
6 Sean McNeil reports that he doesn't get pcf50633 interrupts any
7 more after resume. This adds back the call to ISR work in
8 the resume, removal of which is probably to do with it.
10 Signed-off-by: Andy Green <andy@openmoko.com>
12 drivers/i2c/chips/pcf50633.c | 10 ++++++++++
13 1 files changed, 10 insertions(+), 0 deletions(-)
15 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
16 index 3bc9fa7..4002c03 100644
17 --- a/drivers/i2c/chips/pcf50633.c
18 +++ b/drivers/i2c/chips/pcf50633.c
19 @@ -2467,6 +2467,16 @@ static int pcf50633_resume(struct device *dev)
21 mutex_unlock(&pcf->lock);
23 + /* gratuitous call to PCF work function, in the case that the PCF
24 + * interrupt edge was missed during resume, this forces the pending
25 + * register clear and lifts the interrupt back high again. In the
26 + * case nothing is waiting for service, no harm done.
29 + get_device(&pcf->client.dev);
30 + if (!schedule_work(&pcf->work) && !pcf->working)
31 + dev_err(&pcf->client.dev, "resume work item may be lost\n");
33 callback_all_resume_dependencies(&pcf->resume_dependency);