[ar71xx] fix GPIO function select bit definitions (based on a patch by Jonas <jmajau...
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1172-fix-pcf50633-add-back-gratuitous-isr-work-call-in-re.patch
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
5
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.
9
10 Signed-off-by: Andy Green <andy@openmoko.com>
11 ---
12 drivers/i2c/chips/pcf50633.c | 10 ++++++++++
13 1 files changed, 10 insertions(+), 0 deletions(-)
14
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)
20
21 mutex_unlock(&pcf->lock);
22
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.
27 + */
28 +
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");
32 +
33 callback_all_resume_dependencies(&pcf->resume_dependency);
34
35 return 0;
36 --
37 1.5.6.3
38
This page took 0.046496 seconds and 5 git commands to generate.