re-arrange ps3 tree
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1032-pcf50633-suspend-hacks.patch.patch
1 From 56b25d1ddc3662594f9344bac89f08bcf993cc61 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Fri, 4 Apr 2008 11:34:44 +0100
4 Subject: [PATCH] pcf50633-suspend-hacks.patch
5
6 ---
7 drivers/i2c/chips/pcf50633.c | 22 ++++++++++++++++++++--
8 1 files changed, 20 insertions(+), 2 deletions(-)
9
10 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
11 index 5488084..0cf5e53 100644
12 --- a/drivers/i2c/chips/pcf50633.c
13 +++ b/drivers/i2c/chips/pcf50633.c
14 @@ -567,8 +567,26 @@ static void pcf50633_work(struct work_struct *work)
15 */
16 ret = i2c_smbus_read_i2c_block_data(&pcf->client, PCF50633_REG_INT1, 5,
17 pcfirq);
18 - if (ret != 5)
19 - DEBUGP("Oh crap PMU IRQ register read failed %d\n", ret);
20 + if (ret != 5) {
21 + DEBUGP("Oh crap PMU IRQ register read failed -- "
22 + "retrying later %d\n", ret);
23 + /*
24 + * this situation can happen during resume, just defer
25 + * handling the interrupt until enough I2C is up we can
26 + * actually talk to the PMU. We can't just ignore this
27 + * because we are on a falling edge interrupt and our
28 + * PMU interrupt source does not clear until we read these
29 + * interrupt source registers.
30 + */
31 + if (!schedule_work(&pcf->work) && !pcf->working)
32 + dev_dbg(&pcf->client.dev, "work item may be lost\n");
33 +
34 + /* we don't put the device here, hold it for next time */
35 + mutex_unlock(&pcf->working_lock);
36 + /* don't spew, delaying whatever else is happening */
37 + msleep(1);
38 + return;
39 + }
40
41 if (!pcf->coldplug_done) {
42 DEBUGP("PMU Coldplug init\n");
43 --
44 1.5.6.5
45
This page took 0.041937 seconds and 5 git commands to generate.