Interrupt registering for PIO problem in ATMEL chips
Andrew Victor
avictor.za at gmail.com
Mon Feb 22 15:26:59 EST 2010
hi,
> Also, PIOs can not distinguish between inputs and interrupts, as they
> treat everything as inputs.
Not quite. Interrupts in GPIO input pins are optional.
> Now, my problem is I am writing this keypad driver, which is connected
> to PIOA.
There are existing GPIO-driven keypad drivers - have a look in
drivers/input/keyboard/.
> The PIOA is connected to pin 2 of AIC, but then I can not install the
> handler for pin2, It fails saying error -22 ( resource not available).
> I also don't know, what I can do even if I get to install the handler
> for PIO.
You request the interrupt only for the specific GPIO pin(s) you're
using. You don't request all PIOA interrupts.
ie, do the following:
request_irq(AT91_PIN_PA2, ...)
Regards,
Andrew Victor
More information about the linux-arm-kernel
mailing list