Thread (17 messages) 17 messages, 2 authors, 2012-08-04

Re: [PATCH 4/4] gpio/pca953x: register the device irq using appropriate api's

From: Mahapatra, Chandrabhanu <hidden>
Date: 2012-07-23 06:52:56
Also in: lkml

On Thu, Jul 12, 2012 at 3:41 AM, Linus Walleij [off-list ref] wrote:
On Tue, Jul 10, 2012 at 3:36 PM, Chandrabhanu Mahapatra
[off-list ref] wrote:
quoted
From: Leed Aguilar <redacted>

Here, the implementation of registration of requested IRQs has been corrected
with appropiate api's. The gpio number is requested through gpio_request_one()
API and conversion of the gpio to irq is done using the gpio_to_irq() API.

Change-Id: I964145e2a280d6553ea2c05ea8049810a1983930
Delete that.
quoted
Signed-off-by: Leed Aguilar <redacted>
Signed-off-by: Chandrabhanu Mahapatra <redacted>
---
 drivers/gpio/gpio-pca953x.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index c3ca7d8..27486da 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -509,7 +509,13 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
 #endif
                }

-               ret = request_threaded_irq(client->irq,
+               ret = gpio_request_one(client->irq, GPIOF_IN, "pca953x");
Not that it's really related to this one patch, but why is a GPIO number named
"irq" in client->irq??
Sorry, for the late reply. You need not pull this patch. There has
been some slight miss understanding and as it turns out the
gpio_request_one() should actually be done in the board file with the
appropriate gpio number. This gpio number should be converted to irq
in the board file and then finally sent as client->irq to pca953x
driver. Please undo this patch.


-- 
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help