Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gpio.h File Reference
#include <mach/gpio.h>
#include <linux/compiler.h>
#include <linux/gpio.h>
#include <asm/irq.h>
#include <asm/errno.h>
#include <asm-generic/gpio.h>

Go to the source code of this file.

Data Structures

struct  gpio_port_t
 

Macros

#define gpio_bank(x)   ((x) >> 4)
 
#define gpio_bit(x)   (1<<((x) & 0xF))
 
#define gpio_sub_n(x)   ((x) & 0xF)
 
#define GPIO_BANKSIZE   16
 
#define GPIO_BANK_NUM   DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE)
 
#define PERIPHERAL_USAGE   1
 
#define GPIO_USAGE   0
 
#define BFIN_GPIO_PINT   0
 

Functions

void set_gpio_dir (unsigned, unsigned short)
 
void set_gpio_inen (unsigned, unsigned short)
 
void set_gpio_polar (unsigned, unsigned short)
 
void set_gpio_edge (unsigned, unsigned short)
 
void set_gpio_both (unsigned, unsigned short)
 
void set_gpio_data (unsigned, unsigned short)
 
void set_gpio_maska (unsigned, unsigned short)
 
void set_gpio_maskb (unsigned, unsigned short)
 
void set_gpio_toggle (unsigned)
 
void set_gpiop_dir (unsigned, unsigned short)
 
void set_gpiop_inen (unsigned, unsigned short)
 
void set_gpiop_polar (unsigned, unsigned short)
 
void set_gpiop_edge (unsigned, unsigned short)
 
void set_gpiop_both (unsigned, unsigned short)
 
void set_gpiop_data (unsigned, unsigned short)
 
void set_gpiop_maska (unsigned, unsigned short)
 
void set_gpiop_maskb (unsigned, unsigned short)
 
unsigned short get_gpio_dir (unsigned)
 
unsigned short get_gpio_inen (unsigned)
 
unsigned short get_gpio_polar (unsigned)
 
unsigned short get_gpio_edge (unsigned)
 
unsigned short get_gpio_both (unsigned)
 
unsigned short get_gpio_maska (unsigned)
 
unsigned short get_gpio_maskb (unsigned)
 
unsigned short get_gpio_data (unsigned)
 
unsigned short get_gpiop_dir (unsigned)
 
unsigned short get_gpiop_inen (unsigned)
 
unsigned short get_gpiop_polar (unsigned)
 
unsigned short get_gpiop_edge (unsigned)
 
unsigned short get_gpiop_both (unsigned)
 
unsigned short get_gpiop_maska (unsigned)
 
unsigned short get_gpiop_maskb (unsigned)
 
unsigned short get_gpiop_data (unsigned)
 
int bfin_gpio_request (unsigned gpio, const char *label)
 
void bfin_gpio_free (unsigned gpio)
 
int bfin_gpio_irq_request (unsigned gpio, const char *label)
 
void bfin_gpio_irq_free (unsigned gpio)
 
int bfin_gpio_direction_input (unsigned gpio)
 
int bfin_gpio_direction_output (unsigned gpio, int value)
 
int bfin_gpio_get_value (unsigned gpio)
 
void bfin_gpio_set_value (unsigned gpio, int value)
 

Macro Definition Documentation

#define BFIN_GPIO_PINT   0

Definition at line 23 of file gpio.h.

#define gpio_bank (   x)    ((x) >> 4)

Definition at line 10 of file gpio.h.

#define GPIO_BANK_NUM   DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE)

Definition at line 15 of file gpio.h.

#define GPIO_BANKSIZE   16

Definition at line 14 of file gpio.h.

#define gpio_bit (   x)    (1<<((x) & 0xF))

Definition at line 11 of file gpio.h.

#define gpio_sub_n (   x)    ((x) & 0xF)

Definition at line 12 of file gpio.h.

#define GPIO_USAGE   0

Definition at line 20 of file gpio.h.

#define PERIPHERAL_USAGE   1

Definition at line 19 of file gpio.h.

Function Documentation

int bfin_gpio_direction_input ( unsigned  gpio)

Definition at line 1123 of file bfin_gpio.c.

int bfin_gpio_direction_output ( unsigned  gpio,
int  value 
)

Definition at line 1165 of file bfin_gpio.c.

void bfin_gpio_free ( unsigned  gpio)

Definition at line 959 of file bfin_gpio.c.

int bfin_gpio_get_value ( unsigned  gpio)

Definition at line 1191 of file bfin_gpio.c.

void bfin_gpio_irq_free ( unsigned  gpio)

Definition at line 1089 of file bfin_gpio.c.

int bfin_gpio_irq_request ( unsigned  gpio,
const char label 
)

Definition at line 1056 of file bfin_gpio.c.

int bfin_gpio_request ( unsigned  gpio,
const char label 
)

Definition at line 901 of file bfin_gpio.c.

void bfin_gpio_set_value ( unsigned  gpio,
int  value 
)

Definition at line 1156 of file bfin_gpio.c.

unsigned short get_gpio_both ( unsigned  )
unsigned short get_gpio_data ( unsigned  )
unsigned short get_gpio_dir ( unsigned  )
unsigned short get_gpio_edge ( unsigned  )
unsigned short get_gpio_inen ( unsigned  )
unsigned short get_gpio_maska ( unsigned  )
unsigned short get_gpio_maskb ( unsigned  )
unsigned short get_gpio_polar ( unsigned  )
unsigned short get_gpiop_both ( unsigned  )
unsigned short get_gpiop_data ( unsigned  )
unsigned short get_gpiop_dir ( unsigned  )
unsigned short get_gpiop_edge ( unsigned  )
unsigned short get_gpiop_inen ( unsigned  )
unsigned short get_gpiop_maska ( unsigned  )
unsigned short get_gpiop_maskb ( unsigned  )
unsigned short get_gpiop_polar ( unsigned  )
void set_gpio_both ( unsigned  ,
unsigned  short 
)
void set_gpio_data ( unsigned  ,
unsigned  short 
)
void set_gpio_dir ( unsigned  ,
unsigned  short 
)
void set_gpio_edge ( unsigned  ,
unsigned  short 
)
void set_gpio_inen ( unsigned  ,
unsigned  short 
)
void set_gpio_maska ( unsigned  ,
unsigned  short 
)
void set_gpio_maskb ( unsigned  ,
unsigned  short 
)
void set_gpio_polar ( unsigned  ,
unsigned  short 
)
void set_gpio_toggle ( unsigned  )
void set_gpiop_both ( unsigned  ,
unsigned  short 
)
void set_gpiop_data ( unsigned  ,
unsigned  short 
)
void set_gpiop_dir ( unsigned  ,
unsigned  short 
)
void set_gpiop_edge ( unsigned  ,
unsigned  short 
)
void set_gpiop_inen ( unsigned  ,
unsigned  short 
)
void set_gpiop_maska ( unsigned  ,
unsigned  short 
)
void set_gpiop_maskb ( unsigned  ,
unsigned  short 
)
void set_gpiop_polar ( unsigned  ,
unsigned  short 
)