This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can OMAP-L138 Linux PSP support userspace GPIO (/sys/class/gpio)?

Other Parts Discussed in Thread: OMAP-L138

Hi,

I am wondering if I can get /sys/class/gpio to be supported by the OMAP-L138 PSP (03.20.00.14)?

At the moment I believe that this is not available.

 

I hope to get some advice on this matter.

 

  • Hi,

    You have to enable CONFIG_GPIO_SYSFS from menuconfig to see the /sys/class/gpio interface.

    I have attached a simple shell script along with this mail to demonstrate the usage of GPIO from user space. Note that if GPIO is being used from Kernel, then that pin cannot be accessed from user space.

    The attached example makes use of GPIO pin 64 to find out whether MMC/SD card is inserted in OMAP-L138 EVM or not. To use this example, you need to disable the gpio_request() for this pin from kernel.

    Regards, Sudhakar