BeagleboardxM GPIO control

Hi,

I bought a piece of beagleboardxM last year.

I would like to control GPIO in kernel space.

I found two gpio files in the kernel.

The path as below,

  1. /rowboat-android/kernel/arch/arm/plat-omap/gpio.c

  2. /rowboat-android/kernel/arch/arm/mach-omap2/board-omap3beagle.c
    Could you tell me which file should I modify if I want to control GPIO on beagleboardxM?

Thanks!
Duncan

Hi,

board-omap3beagle.c
Probably you want to configure PIN MUX: http://elinux.org/BeagleBoardPinMux
Example kernel modules using GPIO:
http://beagleboard.org/project/BBPeripheralEx/

Br,
Marko

Hi Markova,
Thank you for your help!
I will try the method on the website you provided and will discuss
the content with you if needed.

Best Regards,
Duncan

M H <mhakkara@gmail.com> 於 2012年2月10日星期五寫道:

Hi,
I add some GPIO control function in the __init omap3_beagle_init_rev function of
board-omap3beagle.c to control GPIO15 from logical ‘0’ (default state) to logical ‘1’.
Please see the code I added below.But GPIO15 cannot be changed,it always in logical ‘0’.
Could any body can tell me what’s wrong?

static void __init omap3_beagle_init_rev(void)
{

omap_mux_init_gpio(15, OMAP_PIN_OUTPUT);
gpio_request(15, “TEST_GPIO15”);
gpio_direction_output(15,1);
gpio_set_value(15, 1);

}

Thanks!
Duncan

Duncan <shyian2008@gmail.com> 於 2012年2月12日下午9:45 寫道: