Welcome to the General Purpose Input Output (GPIO) Driver wiki.
This webpage describes the GPIO driver software development effort, mainly its current status and features planned in the road map.
The devices without the dedicated input/output and/or interrupt controllers can make use of the GPIO interface to accomplish their functionalities, the device list includes touch screen, keypad, Ethernet etc.
 List of Features Supported
- On all OMAP boards
- Reserve and free OMAP2 GPIO pins
- Set the data input and output direction
- Configure GPIO pin to high or low states.
- Configure GPIO pins for interrupt control
- Enable and disable interrupts
- Enable and disable wakeup capability per GPIO pin.
- Edge and level control for each one of the GPIO pins
- GPIO initialization
- The GPIO initialization routine basically initializes the GPIO modules, functional and interface clocks and performs the software reset to the GPIO modules. The kernels interrupt enable and disable routines are mapped to the GPIO mask and unmask routines.
- GPIO configuration
- The GPIO driver allows the client drivers to configure specific GPIO pin direction to be either an input or output. The client drivers can configure the acquired GPIO pin to high or low state depending on their need like data in or out.
- Resource Management
- The GPIO driver provides request and free APIs to manage the available GPIO pins. Any client driver using the GPIO interface shall request for a specific GPIO line and appropriately free the same if it is not in use.
- Interrupt handling
- The client drivers register their interrupt handlers by the standard Linux kernel API. Once a GPIO interrupt triggered, the GPIO Library basically demuxes the received interrupt to a client driver handler which is registered via the Linux request_irq() API. The GPIO library also provides API’s to mask (enable) and unmask (disable) the GPIO interrupts, the system calls enable_irq and disable_irq system calls are internally mapped to GPIO library routines.
- The GPIO library provides API’s to enable or disable debounce capability for each input lines. The debounce time also can be specified using one of the GPIO library routines.
 Feature Status Summary
Here is the summary of completed, ongoing and planned features in the GPIO driver.
|ID||Title||Target Week||Upstream Status||Link to Patches||Priority||Owner||Dev Status||Comments & Link to Details|
|GPIO01||Support GPIO driver for configuring, managing and interrupt handling of available GPIO pins||NA||Already supported||GPIO Driver||NA||Charulatha||Released in XXXX||See details|
|GPIO02||HWMOD support for GPIO driver||NA||External review is in progress||
Platform Device Implementation Support for OMAP15xx chips Support for OMAP16xx chips Support for OMAP7xx chips Support for OMAP2PLUS chips hwmods for OMAP3 hwmod for omap2420 hwmods for omap2430 GPIO as platform device
|NA||Charulatha||Released in L24.6||See details|
 Defect Status Summary
Here is the summary of completed, ongoing and planned defect fixes in the GPIO driver.
|ID||Title||Target Week||Upstream Status||Link to Patches||Features Impacted||Priority||Owner||Dev Status||Comments & Link to Details|
|Nothing to Report||NA||NA||NA||NA||NA||NA||NA||NA||NA|
1. Is it possible to control OMAP GPIOs from userspace?
Yes, by using some nodes exported to sysfs. For example: To toggle GPIO155, do the following:
Mux the pad to gpio mode.
To bring out the gpio to userspace:
echo 155 > /sys/class/gpio/export
To set as an output:
echo out > /sys/class/gpio/gpio155/direction
To set high:
echo 1 > /sys/class/gpio/gpio155/value
To set low:
echo 0 > /sys/class/gpio/gpio155/value
Similarly cat these nodes to read the value of input gpios.
 Feature Status Details
 GPIO01 : Support GPIO driver for configuring, managing and interrupt handling of available GPIO pins
This feature is already supported in the driver.
 GPIO02 : HWMOD support for GPIO driver
The hwmod support for gpio driver is reviewed in open source mailing list.
 Defect Status Details
None reported so far
 Future Development Plan
None at present
 Information on Testing Procedures
To be added
 Submit Your Ideas Here
Please list them as separate subsections (use ===title===). Please include your name, email ID and date for easy processing.
Charulatha V <charu[at]ti[dot]com>
Charulatha V <charu[at]ti[dot]com>
 Patches Merged in kernel.org
 Recent Submissions to Open Source
 Current Status of Patches in Omapzoom Tree