Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gpio.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <asm/qe.h>

Go to the source code of this file.

Data Structures

struct  qe_gpio_chip
 
struct  qe_pin
 

Macros

#define QE_PIN_REQUESTED   0
 

Functions

struct qe_pinqe_pin_request (struct device_node *np, int index)
 
 EXPORT_SYMBOL (qe_pin_request)
 
void qe_pin_free (struct qe_pin *qe_pin)
 
 EXPORT_SYMBOL (qe_pin_free)
 
void qe_pin_set_dedicated (struct qe_pin *qe_pin)
 
 EXPORT_SYMBOL (qe_pin_set_dedicated)
 
void qe_pin_set_gpio (struct qe_pin *qe_pin)
 
 EXPORT_SYMBOL (qe_pin_set_gpio)
 
 arch_initcall (qe_add_gpiochips)
 

Macro Definition Documentation

#define QE_PIN_REQUESTED   0

Definition at line 31 of file gpio.c.

Function Documentation

arch_initcall ( qe_add_gpiochips  )
EXPORT_SYMBOL ( qe_pin_request  )
EXPORT_SYMBOL ( qe_pin_free  )
EXPORT_SYMBOL ( qe_pin_set_dedicated  )
EXPORT_SYMBOL ( qe_pin_set_gpio  )
void qe_pin_free ( struct qe_pin qe_pin)

qe_pin_free - Free a pin : pointer to the qe_pin structure Context: any

This function frees the qe_pin structure and makes a pin available for further qe_pin_request() calls.

Definition at line 200 of file gpio.c.

struct qe_pin* qe_pin_request ( struct device_node np,
int  index 
)
read

qe_pin_request - Request a QE pin : device node to get a pin from : index of a pin in the device tree Context: non-atomic

This function return qe_pin so that you could use it with the rest of the QE Pin Multiplexing API.

Definition at line 139 of file gpio.c.

void qe_pin_set_dedicated ( struct qe_pin qe_pin)

qe_pin_set_dedicated - Revert a pin to a dedicated peripheral function mode : pointer to the qe_pin structure Context: any

This function resets a pin to a dedicated peripheral function that has been set up by the firmware.

Definition at line 222 of file gpio.c.

void qe_pin_set_gpio ( struct qe_pin qe_pin)

qe_pin_set_gpio - Set a pin to the GPIO mode : pointer to the qe_pin structure Context: any

This function sets a pin to the GPIO mode.

Definition at line 262 of file gpio.c.