I'm trying to write a driver based on the sample char-driver.c on the =
wiki (see: http://docswiki.gumstix.org/Kernel_programming). However, I =
want to access the GPIO lines on the UCB1400 not the ones on the =
At first I was hoping that the UCB's GPIOs would somehow be mapped onto =
IRQs following the last "regular" GPIO. But no luck there.
I then found this file: pxa-ac97.c - which defines the code for =
displaying /proc/gpio/UCB1400-0-[0-9]. If I'm reading the code right =
then it looks like they all share one IRQ along with the sound chip =
(which seems to be born out by "cat /dev/audio" which spews forth =
characters as soon as I change one of the UCB GPIOs). And that when the =
interrupt is received I need to interrept the received data to figure =
out which pin changed.
So, do I need to try and mimic what pxa-ac97.c does in it's interrupt =
handling for the GPIOs? Or is there a better (simpler) way?
My overall goal is to create a driver for an optical rotary encoder with =
a push button that is connected to 3 GPIOs (1 for the button, 2 for the =
encoder's quadrature output). The driver would take these interrupts =
and then send keycodes on up to the system (effectively spoofing the =