Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
devres.c File Reference
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/device.h>
#include <linux/gfp.h>

Go to the source code of this file.

Functions

int devm_gpio_request (struct device *dev, unsigned gpio, const char *label)
 
 EXPORT_SYMBOL (devm_gpio_request)
 
int devm_gpio_request_one (struct device *dev, unsigned gpio, unsigned long flags, const char *label)
 
 EXPORT_SYMBOL (devm_gpio_request_one)
 
void devm_gpio_free (struct device *dev, unsigned int gpio)
 
 EXPORT_SYMBOL (devm_gpio_free)
 

Function Documentation

void devm_gpio_free ( struct device dev,
unsigned int  gpio 
)

devm_gpio_free - free an interrupt : device to free gpio for : gpio to free

Except for the extra argument, this function takes the same arguments and performs the same function as gpio_free(). This function instead of gpio_free() should be used to manually free GPIOs allocated with devm_gpio_request().

Definition at line 113 of file devres.c.

int devm_gpio_request ( struct device dev,
unsigned  gpio,
const char label 
)

devm_gpio_request - request a gpio for a managed device : device to request the gpio for : gpio to allocate : the name of the requested gpio

Except for the extra argument, this function takes the same arguments and performs the same function as gpio_request(). GPIOs requested with this function will be automatically freed on driver detach.

If an GPIO allocated with this function needs to be freed separately, devm_gpio_free() must be used.

Definition at line 51 of file devres.c.

int devm_gpio_request_one ( struct device dev,
unsigned  gpio,
unsigned long  flags,
const char label 
)

devm_gpio_request_one - request a single GPIO with initial setup : device to request for : the GPIO number : GPIO configuration as specified by GPIOF_* : a literal description string of this GPIO

Definition at line 80 of file devres.c.

EXPORT_SYMBOL ( devm_gpio_request  )
EXPORT_SYMBOL ( devm_gpio_request_one  )
EXPORT_SYMBOL ( devm_gpio_free  )