[ar71xx] preliminary support for the Ubiquiti RouterStation Pro
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1193-fix-pcf50633-add-back-gratuitous-isr-work-call-in-re.patch
1 From b6aa20d6e44fccefba7ca933d11befba3611a68a Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 2 Jul 2008 22:40:58 +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 6e50ae8..037ae04 100644
17 --- a/drivers/i2c/chips/pcf50633.c
18 +++ b/drivers/i2c/chips/pcf50633.c
19 @@ -2474,6 +2474,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.5
38
This page took 0.053399 seconds and 5 git commands to generate.