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/clk.h>
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/irqdomain.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_gpio.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h>
#include <mach/at91_pio.h>
#include "generic.h"

Go to the source code of this file.

Data Structures

struct  at91_gpio_chip
 

Macros

#define to_at91_gpio_chip(c)   container_of(c, struct at91_gpio_chip, chip)
 
#define AT91_GPIO_CHIP(name, nr_gpio)
 
#define AT91_GPIO_CAP_PIO3   (1 << 0)
 
#define has_pio3()   (at91_gpio_caps & AT91_GPIO_CAP_PIO3)
 
#define gpio_irq_set_wake   NULL
 

Functions

int __init_or_module at91_set_GPIO_periph (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_GPIO_periph)
 
int __init_or_module at91_set_A_periph (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_A_periph)
 
int __init_or_module at91_set_B_periph (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_B_periph)
 
int __init_or_module at91_set_C_periph (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_C_periph)
 
int __init_or_module at91_set_D_periph (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_D_periph)
 
int __init_or_module at91_set_gpio_input (unsigned pin, int use_pullup)
 
 EXPORT_SYMBOL (at91_set_gpio_input)
 
int __init_or_module at91_set_gpio_output (unsigned pin, int value)
 
 EXPORT_SYMBOL (at91_set_gpio_output)
 
int __init_or_module at91_set_deglitch (unsigned pin, int is_on)
 
 EXPORT_SYMBOL (at91_set_deglitch)
 
int __init_or_module at91_set_debounce (unsigned pin, int is_on, int div)
 
 EXPORT_SYMBOL (at91_set_debounce)
 
int __init_or_module at91_set_multi_drive (unsigned pin, int is_on)
 
 EXPORT_SYMBOL (at91_set_multi_drive)
 
int __init_or_module at91_set_pulldown (unsigned pin, int is_on)
 
 EXPORT_SYMBOL (at91_set_pulldown)
 
int __init_or_module at91_disable_schmitt_trig (unsigned pin)
 
 EXPORT_SYMBOL (at91_disable_schmitt_trig)
 
int at91_set_gpio_value (unsigned pin, int value)
 
 EXPORT_SYMBOL (at91_set_gpio_value)
 
int at91_get_gpio_value (unsigned pin)
 
 EXPORT_SYMBOL (at91_get_gpio_value)
 
int __init at91_gpio_of_irq_setup (struct device_node *node, struct device_node *parent)
 
void __init at91_gpio_irq_setup (void)
 
void __init at91_gpio_init (struct at91_gpio_bank *data, int nr_banks)
 

Macro Definition Documentation

#define AT91_GPIO_CAP_PIO3   (1 << 0)

Definition at line 84 of file gpio.c.

#define AT91_GPIO_CHIP (   name,
  nr_gpio 
)
Value:
{ \
.chip = { \
.label = name, \
.direction_input = at91_gpiolib_direction_input, \
.direction_output = at91_gpiolib_direction_output, \
.get = at91_gpiolib_get, \
.set = at91_gpiolib_set, \
.dbg_show = at91_gpiolib_dbg_show, \
.to_irq = at91_gpiolib_to_irq, \
.ngpio = nr_gpio, \
}, \
}

Definition at line 58 of file gpio.c.

#define gpio_irq_set_wake   NULL

Definition at line 487 of file gpio.c.

#define has_pio3 ( )    (at91_gpio_caps & AT91_GPIO_CAP_PIO3)

Definition at line 86 of file gpio.c.

#define to_at91_gpio_chip (   c)    container_of(c, struct at91_gpio_chip, chip)

Definition at line 47 of file gpio.c.

Function Documentation

int __init_or_module at91_disable_schmitt_trig ( unsigned  pin)

Definition at line 376 of file gpio.c.

int at91_get_gpio_value ( unsigned  pin)

Definition at line 408 of file gpio.c.

void __init at91_gpio_init ( struct at91_gpio_bank data,
int  nr_banks 
)

Definition at line 1075 of file gpio.c.

void __init at91_gpio_irq_setup ( void  )

Definition at line 812 of file gpio.c.

int __init at91_gpio_of_irq_setup ( struct device_node node,
struct device_node parent 
)

Definition at line 783 of file gpio.c.

int __init_or_module at91_set_A_periph ( unsigned  pin,
int  use_pullup 
)

Definition at line 161 of file gpio.c.

int __init_or_module at91_set_B_periph ( unsigned  pin,
int  use_pullup 
)

Definition at line 188 of file gpio.c.

int __init_or_module at91_set_C_periph ( unsigned  pin,
int  use_pullup 
)

Definition at line 215 of file gpio.c.

int __init_or_module at91_set_D_periph ( unsigned  pin,
int  use_pullup 
)

Definition at line 236 of file gpio.c.

int __init_or_module at91_set_debounce ( unsigned  pin,
int  is_on,
int  div 
)

Definition at line 318 of file gpio.c.

int __init_or_module at91_set_deglitch ( unsigned  pin,
int  is_on 
)

Definition at line 300 of file gpio.c.

int __init_or_module at91_set_gpio_input ( unsigned  pin,
int  use_pullup 
)

Definition at line 258 of file gpio.c.

int __init_or_module at91_set_gpio_output ( unsigned  pin,
int  value 
)

Definition at line 279 of file gpio.c.

int __init_or_module at91_set_GPIO_periph ( unsigned  pin,
int  use_pullup 
)

Definition at line 143 of file gpio.c.

int at91_set_gpio_value ( unsigned  pin,
int  value 
)

Definition at line 392 of file gpio.c.

int __init_or_module at91_set_multi_drive ( unsigned  pin,
int  is_on 
)

Definition at line 341 of file gpio.c.

int __init_or_module at91_set_pulldown ( unsigned  pin,
int  is_on 
)

Definition at line 358 of file gpio.c.

EXPORT_SYMBOL ( at91_set_GPIO_periph  )
EXPORT_SYMBOL ( at91_set_A_periph  )
EXPORT_SYMBOL ( at91_set_B_periph  )
EXPORT_SYMBOL ( at91_set_C_periph  )
EXPORT_SYMBOL ( at91_set_D_periph  )
EXPORT_SYMBOL ( at91_set_gpio_input  )
EXPORT_SYMBOL ( at91_set_gpio_output  )
EXPORT_SYMBOL ( at91_set_deglitch  )
EXPORT_SYMBOL ( at91_set_debounce  )
EXPORT_SYMBOL ( at91_set_multi_drive  )
EXPORT_SYMBOL ( at91_set_pulldown  )
EXPORT_SYMBOL ( at91_disable_schmitt_trig  )
EXPORT_SYMBOL ( at91_set_gpio_value  )
EXPORT_SYMBOL ( at91_get_gpio_value  )