Beagleboard xm GPIO IRQ

Hi all,

I am trying to use any of GPIO pins on Beagleboard xm as an interrupt
for my kernel module, but I can't get it to work.
I followed the following:

the configuration of pin multiplexing are done in u-boot
MUX_VAL(CP(MMC2_DAT7), (IEN | PTD | EN | M4)) /*GPIO_139 - pin 3*/

then I used gpiolib as follows:
   gpio_request(139, NULL);
   request_irq(gpio_to_irq(139), irq_handler_func,
          "INTR", data);

any suggestions?

did u get any solution
How do you know the functions for operations with GPIO…

Double-check that your pinmux is working correctly. My workmate had a
similar problem for one of the GPIO pins that is shared with MMC2 (just
like in your example).

One way to do this is to hook up a switch to the GPIO-Pin, boot the
board and then read the current state of the GPIO directly from the
peripheral register (e.g. bypass all kernel stuff). If this works, but
no interrupts get generated it is most likely miss-use of the gpiolib.

If it does not work some other driver has modified the gpio settings
after your kernel-mode driver has loaded. divide and conquer will tell
you which driver. In your case it is most likely the mmc2 driver.


Hi. all,

I am new to beagle board…
I have booted angstrom .
But i dont know where to take off from here…
i dont know how to write a code and make some led glow with GPIO… Please Please Please give me some helping hand… i want a jump start…

Manually test the pin status (if it's low or high (1.8V)) to verify if
something changed you pin status.

Anyway you are triggering an interrupt for the low state of pin
MMC2_DAT, and the pin has a pulldown applied, maybe the interrupt is
never triggered because the pin never changes state.
Try instead to apply a pullup (change PTD to PTU), and wire a button
switch that connect the pin to GND when pressed, and maybe try
triggering not the low level, but the falling edge of the signal
Moreover, ALWAYS check the return values, just in example you could
find that the gpio you want to use cannot be used as irq (check the
gpio_to_irq return value).

I could assure you that on a beagle C4, even without setting
multiplexer, using gpio138 and 139 it works.
Hope it helps

For everyone interested in GPIO handling, take a look here: