This patch changes the IRQ type of pcf50633 from falling to low-level
triggered.

Matt
From: Matt Hsu <[EMAIL PROTECTED]>
Date: Thu, 13 Nov 2008 18:31:15 +0800

  change the IRQ type of pcf50633

---
 drivers/i2c/chips/pcf50633.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
index 2178830..5bc428d 100644
--- a/drivers/i2c/chips/pcf50633.c
+++ b/drivers/i2c/chips/pcf50633.c
@@ -1226,6 +1226,7 @@ static void pcf50633_work(struct work_struct *work)
 
 	DEBUGPC("\n");
 
+	enable_irq(pcf->irq);
 bail:
 	pcf->working = 0;
 	input_sync(pcf->input_dev);
@@ -1258,6 +1259,7 @@ static irqreturn_t pcf50633_irq(int irq, void *_pcf)
 	DEBUGP("entering(irq=%u, pcf=%p): scheduling work\n", irq, _pcf);
 	dev_dbg(&pcf->client.dev, "pcf50633_irq scheduling work\n");
 
+	disable_irq(pcf->irq);
 	get_device(&pcf->client.dev);
 	if (!schedule_work(&pcf->work) && !pcf->working)
 		dev_err(&pcf->client.dev, "pcf irq work already queued\n");
@@ -2231,8 +2233,8 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind)
 	reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
 	reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f);
 
-	err = request_irq(irq, pcf50633_irq, IRQF_TRIGGER_FALLING,
-			  "pcf50633", pcf);
+	err = request_irq(irq, pcf50633_irq, IRQF_TRIGGER_LOW,
+				"pcf50633", pcf);
 	if (err < 0)
 		goto exit_input;
 
-- 
1.5.5.1

Reply via email to