Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gpio-lpc32xx.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/gpio.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <mach/hardware.h>
#include <mach/platform.h>
#include <mach/gpio-lpc32xx.h>
#include <mach/irqs.h>

Go to the source code of this file.

Data Structures

struct  gpio_regs
 
struct  lpc32xx_gpio_chip
 

Macros

#define LPC32XX_GPIO_P3_INP_STATE   _GPREG(0x000)
 
#define LPC32XX_GPIO_P3_OUTP_SET   _GPREG(0x004)
 
#define LPC32XX_GPIO_P3_OUTP_CLR   _GPREG(0x008)
 
#define LPC32XX_GPIO_P3_OUTP_STATE   _GPREG(0x00C)
 
#define LPC32XX_GPIO_P2_DIR_SET   _GPREG(0x010)
 
#define LPC32XX_GPIO_P2_DIR_CLR   _GPREG(0x014)
 
#define LPC32XX_GPIO_P2_DIR_STATE   _GPREG(0x018)
 
#define LPC32XX_GPIO_P2_INP_STATE   _GPREG(0x01C)
 
#define LPC32XX_GPIO_P2_OUTP_SET   _GPREG(0x020)
 
#define LPC32XX_GPIO_P2_OUTP_CLR   _GPREG(0x024)
 
#define LPC32XX_GPIO_P2_MUX_SET   _GPREG(0x028)
 
#define LPC32XX_GPIO_P2_MUX_CLR   _GPREG(0x02C)
 
#define LPC32XX_GPIO_P2_MUX_STATE   _GPREG(0x030)
 
#define LPC32XX_GPIO_P0_INP_STATE   _GPREG(0x040)
 
#define LPC32XX_GPIO_P0_OUTP_SET   _GPREG(0x044)
 
#define LPC32XX_GPIO_P0_OUTP_CLR   _GPREG(0x048)
 
#define LPC32XX_GPIO_P0_OUTP_STATE   _GPREG(0x04C)
 
#define LPC32XX_GPIO_P0_DIR_SET   _GPREG(0x050)
 
#define LPC32XX_GPIO_P0_DIR_CLR   _GPREG(0x054)
 
#define LPC32XX_GPIO_P0_DIR_STATE   _GPREG(0x058)
 
#define LPC32XX_GPIO_P1_INP_STATE   _GPREG(0x060)
 
#define LPC32XX_GPIO_P1_OUTP_SET   _GPREG(0x064)
 
#define LPC32XX_GPIO_P1_OUTP_CLR   _GPREG(0x068)
 
#define LPC32XX_GPIO_P1_OUTP_STATE   _GPREG(0x06C)
 
#define LPC32XX_GPIO_P1_DIR_SET   _GPREG(0x070)
 
#define LPC32XX_GPIO_P1_DIR_CLR   _GPREG(0x074)
 
#define LPC32XX_GPIO_P1_DIR_STATE   _GPREG(0x078)
 
#define GPIO012_PIN_TO_BIT(x)   (1 << (x))
 
#define GPIO3_PIN_TO_BIT(x)   (1 << ((x) + 25))
 
#define GPO3_PIN_TO_BIT(x)   (1 << (x))
 
#define GPIO012_PIN_IN_SEL(x, y)   (((x) >> (y)) & 1)
 
#define GPIO3_PIN_IN_SHIFT(x)   ((x) == 5 ? 24 : 10 + (x))
 
#define GPIO3_PIN_IN_SEL(x, y)   (((x) >> GPIO3_PIN_IN_SHIFT(y)) & 1)
 
#define GPIO3_PIN5_IN_SEL(x)   (((x) >> 24) & 1)
 
#define GPI3_PIN_IN_SEL(x, y)   (((x) >> (y)) & 1)
 
#define GPO3_PIN_IN_SEL(x, y)   (((x) >> (y)) & 1)
 

Functions

 module_platform_driver (lpc32xx_gpio_driver)
 

Macro Definition Documentation

#define GPI3_PIN_IN_SEL (   x,
  y 
)    (((x) >> (y)) & 1)

Definition at line 68 of file gpio-lpc32xx.c.

#define GPIO012_PIN_IN_SEL (   x,
  y 
)    (((x) >> (y)) & 1)

Definition at line 64 of file gpio-lpc32xx.c.

#define GPIO012_PIN_TO_BIT (   x)    (1 << (x))

Definition at line 61 of file gpio-lpc32xx.c.

#define GPIO3_PIN5_IN_SEL (   x)    (((x) >> 24) & 1)

Definition at line 67 of file gpio-lpc32xx.c.

#define GPIO3_PIN_IN_SEL (   x,
  y 
)    (((x) >> GPIO3_PIN_IN_SHIFT(y)) & 1)

Definition at line 66 of file gpio-lpc32xx.c.

#define GPIO3_PIN_IN_SHIFT (   x)    ((x) == 5 ? 24 : 10 + (x))

Definition at line 65 of file gpio-lpc32xx.c.

#define GPIO3_PIN_TO_BIT (   x)    (1 << ((x) + 25))

Definition at line 62 of file gpio-lpc32xx.c.

#define GPO3_PIN_IN_SEL (   x,
  y 
)    (((x) >> (y)) & 1)

Definition at line 69 of file gpio-lpc32xx.c.

#define GPO3_PIN_TO_BIT (   x)    (1 << (x))

Definition at line 63 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_DIR_CLR   _GPREG(0x054)

Definition at line 51 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_DIR_SET   _GPREG(0x050)

Definition at line 50 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_DIR_STATE   _GPREG(0x058)

Definition at line 52 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_INP_STATE   _GPREG(0x040)

Definition at line 46 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_OUTP_CLR   _GPREG(0x048)

Definition at line 48 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_OUTP_SET   _GPREG(0x044)

Definition at line 47 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P0_OUTP_STATE   _GPREG(0x04C)

Definition at line 49 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_DIR_CLR   _GPREG(0x074)

Definition at line 58 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_DIR_SET   _GPREG(0x070)

Definition at line 57 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_DIR_STATE   _GPREG(0x078)

Definition at line 59 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_INP_STATE   _GPREG(0x060)

Definition at line 53 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_OUTP_CLR   _GPREG(0x068)

Definition at line 55 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_OUTP_SET   _GPREG(0x064)

Definition at line 54 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P1_OUTP_STATE   _GPREG(0x06C)

Definition at line 56 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_DIR_CLR   _GPREG(0x014)

Definition at line 38 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_DIR_SET   _GPREG(0x010)

Definition at line 37 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_DIR_STATE   _GPREG(0x018)

Definition at line 39 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_INP_STATE   _GPREG(0x01C)

Definition at line 40 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_MUX_CLR   _GPREG(0x02C)

Definition at line 44 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_MUX_SET   _GPREG(0x028)

Definition at line 43 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_MUX_STATE   _GPREG(0x030)

Definition at line 45 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_OUTP_CLR   _GPREG(0x024)

Definition at line 42 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P2_OUTP_SET   _GPREG(0x020)

Definition at line 41 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P3_INP_STATE   _GPREG(0x000)

Definition at line 33 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P3_OUTP_CLR   _GPREG(0x008)

Definition at line 35 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P3_OUTP_SET   _GPREG(0x004)

Definition at line 34 of file gpio-lpc32xx.c.

#define LPC32XX_GPIO_P3_OUTP_STATE   _GPREG(0x00C)

Definition at line 36 of file gpio-lpc32xx.c.

Function Documentation

module_platform_driver ( lpc32xx_gpio_driver  )