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/irq.h>
#include <linux/irqdomain.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
#include <plat/orion-gpio.h>

Go to the source code of this file.

Data Structures

struct  orion_gpio_chip
 

Macros

#define DEBUG
 
#define GPIO_OUT_OFF   0x0000
 
#define GPIO_IO_CONF_OFF   0x0004
 
#define GPIO_BLINK_EN_OFF   0x0008
 
#define GPIO_IN_POL_OFF   0x000c
 
#define GPIO_DATA_IN_OFF   0x0010
 
#define GPIO_EDGE_CAUSE_OFF   0x0014
 
#define GPIO_EDGE_MASK_OFF   0x0018
 
#define GPIO_LEVEL_MASK_OFF   0x001c
 
#define ORION_BLINK_HALF_PERIOD   100 /* ms */
 

Functions

void __init orion_gpio_set_unused (unsigned pin)
 
void __init orion_gpio_set_valid (unsigned pin, int mode)
 
void orion_gpio_set_blink (unsigned pin, int blink)
 
 EXPORT_SYMBOL (orion_gpio_set_blink)
 
int orion_gpio_led_blink_set (unsigned gpio, int state, unsigned long *delay_on, unsigned long *delay_off)
 
 EXPORT_SYMBOL_GPL (orion_gpio_led_blink_set)
 
void __init orion_gpio_init (struct device_node *np, int gpio_base, int ngpio, void __iomem *base, int mask_offset, int secondary_irq_base, int irqs[4])
 

Macro Definition Documentation

#define DEBUG

Definition at line 11 of file gpio.c.

#define GPIO_BLINK_EN_OFF   0x0008

Definition at line 33 of file gpio.c.

#define GPIO_DATA_IN_OFF   0x0010

Definition at line 35 of file gpio.c.

#define GPIO_EDGE_CAUSE_OFF   0x0014

Definition at line 36 of file gpio.c.

#define GPIO_EDGE_MASK_OFF   0x0018

Definition at line 37 of file gpio.c.

#define GPIO_IN_POL_OFF   0x000c

Definition at line 34 of file gpio.c.

#define GPIO_IO_CONF_OFF   0x0004

Definition at line 32 of file gpio.c.

#define GPIO_LEVEL_MASK_OFF   0x001c

Definition at line 38 of file gpio.c.

#define GPIO_OUT_OFF   0x0000

Definition at line 31 of file gpio.c.

#define ORION_BLINK_HALF_PERIOD   100 /* ms */

Definition at line 307 of file gpio.c.

Function Documentation

EXPORT_SYMBOL ( orion_gpio_set_blink  )
EXPORT_SYMBOL_GPL ( orion_gpio_led_blink_set  )
void __init orion_gpio_init ( struct device_node np,
int  gpio_base,
int  ngpio,
void __iomem base,
int  mask_offset,
int  secondary_irq_base,
int  irqs[4] 
)

Definition at line 442 of file gpio.c.

int orion_gpio_led_blink_set ( unsigned  gpio,
int  state,
unsigned long delay_on,
unsigned long delay_off 
)

Definition at line 309 of file gpio.c.

void orion_gpio_set_blink ( unsigned  pin,
int  blink 
)

Definition at line 292 of file gpio.c.

void __init orion_gpio_set_unused ( unsigned  pin)

Definition at line 255 of file gpio.c.

void __init orion_gpio_set_valid ( unsigned  pin,
int  mode 
)

Definition at line 269 of file gpio.c.