Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
s5p-irq-gpioint.c File Reference
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <mach/map.h>
#include <plat/gpio-core.h>
#include <plat/gpio-cfg.h>
#include <asm/mach/irq.h>

Go to the source code of this file.

Data Structures

struct  s5p_gpioint_bank
 

Macros

#define GPIO_BASE(chip)   ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u))
 
#define CON_OFFSET   0x700
 
#define MASK_OFFSET   0x900
 
#define PEND_OFFSET   0xA00
 
#define REG_OFFSET(x)   ((x) << 2)
 

Functions

int __init s5p_register_gpio_interrupt (int pin)
 
int __init s5p_register_gpioint_bank (int chain_irq, int start, int nr_groups)
 

Macro Definition Documentation

#define CON_OFFSET   0x700

Definition at line 29 of file s5p-irq-gpioint.c.

#define GPIO_BASE (   chip)    ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u))

Definition at line 27 of file s5p-irq-gpioint.c.

#define MASK_OFFSET   0x900

Definition at line 30 of file s5p-irq-gpioint.c.

#define PEND_OFFSET   0xA00

Definition at line 31 of file s5p-irq-gpioint.c.

#define REG_OFFSET (   x)    ((x) << 2)

Definition at line 32 of file s5p-irq-gpioint.c.

Function Documentation

int __init s5p_register_gpio_interrupt ( int  pin)

s5p_register_gpio_interrupt() - register interrupt support for a gpio group : The pin number from the group to be registered

This function registers gpio interrupt support for the group that the specified pin belongs to.

The total number of gpio pins is quite large ob s5p series. Registering irq support for all of them would be a resource waste. Because of that the interrupt support for standard gpio pins is registered dynamically.

It will return the irq number of the interrupt that has been registered or -ENOMEM if no more gpio interrupts can be registered. It is allowed to call this function more than once for the same gpio group (the group will be registered only once).

Definition at line 174 of file s5p-irq-gpioint.c.

int __init s5p_register_gpioint_bank ( int  chain_irq,
int  start,
int  nr_groups 
)

Definition at line 201 of file s5p-irq-gpioint.c.