diff options
author | Andy Green <andy@openmoko.com> | 2008-12-03 13:55:57 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-12-03 13:55:57 +0000 |
commit | 3d07f3f0db6f78c47cc2feb5f40eedc76a907845 (patch) | |
tree | 28656fc51a4d9ea88c099b9c48c63c31c622e82c /drivers/mfd/pcf50633-core.c | |
parent | 39b50f00280677f59f0c15f187a3844c92be7b8f (diff) |
workaround-decide-PMU-interrupt-level-at-build-time.patch
No need AFAIK to revert GTA02 build to edge as well as GTA03,
so this patch builds the driver with the edge for GTA03 only
and otherwise level.
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd/pcf50633-core.c')
-rw-r--r-- | drivers/mfd/pcf50633-core.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 13dd971207f..5a2b76a8205 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c @@ -367,7 +367,9 @@ static void pcf50633_irq_worker(struct work_struct *work) put_device(pcf->dev); -// enable_irq(pcf->irq); + if (!machine_is_openmoko_gta03()) + enable_irq(pcf->irq); + return; reschedule: schedule_work(&pcf->irq_work); @@ -385,7 +387,9 @@ static irqreturn_t pcf50633_irq(int irq, void *data) get_device(pcf->dev); -// disable_irq(pcf->irq); + if (!machine_is_openmoko_gta03()) + disable_irq(pcf->irq); + schedule_work(&pcf->irq_work); return IRQ_HANDLED; @@ -482,6 +486,10 @@ static int pcf50633_probe(struct i2c_client *client, u8 mbcs1; int version; int variant; + int irqf = IRQF_TRIGGER_LOW; + + if (machine_is_openmoko_gta03()) + irqf = IRQF_TRIGGER_FALLING; pdata = client->dev.platform_data; @@ -550,13 +558,12 @@ static int pcf50633_probe(struct i2c_client *client, platform_device_add(pdev); } - printk(KERN_ERR "q\n"); pcf->irq = client->irq; if (client->irq) { ret = request_irq(client->irq, pcf50633_irq, - IRQF_TRIGGER_FALLING, "pcf50633", pcf); + irqf, "pcf50633", pcf); if (ret) { dev_err(pcf->dev, "Failed to request IRQ %d\n", ret); |