Machine Specific Layer (MSL)
i.MX51 EVK Linux Reference Manual
Freescale Semiconductor
2-7
pins that are capable of generating interrupts. The macro
IOMUX_TO_IRQ_V3()
or
gpio_to_irq()
is
used to convert GPIO pin to irq number,
•
Functions to set an IOMUX pin, named
mxc_iomux_v3_setup_pad()
. If a pin is used as GPIO,
another set of request/free function calls are provided, named
gpio_request()
and
gpio_free()
.
The user should check the return value of the request calls to see if the pin has already been
reserved before modifying the pin state. The free function calls should be made when the pin is not
needed. Furthermore, functions
gpio_direction_input()
and
gpio_direction_output()
are
provided to set GPIO when it’s used as input or output. See the API document and
Documentation/gpio.txt
for more details.
2.5.2
GPIO Features
This GPIO implementation supports the following features:
•
Implements the functions for accessing the GPIO hardware modules
•
Provides a way to control GPIO signal direction and GPIO interrupts
2.5.3
GPIO Source Code Structure
GPIO driver is implemented based on general gpiolib framework. The MSL-layer codes defines and
registers gpio_chip instances for each bank of on-chip GPIOs, in the following files, located in the
directories indicated at the beginning of this chapter:
.
2.5.4
GPIO Programming Interface
For more information, see the API documents and
Documentation/gpio.txt
for the programming
interface.
Table 2-4. GPIO Files
File
Description
gpio.h
GPIO public header file
gpio.c
Function implementation
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...