Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
gpio-omap.h File Reference
#include <linux/io.h>
#include <linux/platform_device.h>
#include <mach/irqs.h>

Go to the source code of this file.

Data Structures

struct  omap_gpio_dev_attr
 
struct  omap_gpio_reg_offs
 
struct  omap_gpio_platform_data
 

Macros

#define OMAP1_MPUIO_BASE   0xfffb5000
 
#define OMAP_MPUIO_INPUT_LATCH   0x00
 
#define OMAP_MPUIO_OUTPUT   0x04
 
#define OMAP_MPUIO_IO_CNTL   0x08
 
#define OMAP_MPUIO_KBR_LATCH   0x10
 
#define OMAP_MPUIO_KBC   0x14
 
#define OMAP_MPUIO_GPIO_EVENT_MODE   0x18
 
#define OMAP_MPUIO_GPIO_INT_EDGE   0x1c
 
#define OMAP_MPUIO_KBD_INT   0x20
 
#define OMAP_MPUIO_GPIO_INT   0x24
 
#define OMAP_MPUIO_KBD_MASKIT   0x28
 
#define OMAP_MPUIO_GPIO_MASKIT   0x2c
 
#define OMAP_MPUIO_GPIO_DEBOUNCING   0x30
 
#define OMAP_MPUIO_LATCH   0x34
 
#define OMAP34XX_NR_GPIOS   6
 
#define OMAP1510_GPIO_DATA_INPUT   0x00
 
#define OMAP1510_GPIO_DATA_OUTPUT   0x04
 
#define OMAP1510_GPIO_DIR_CONTROL   0x08
 
#define OMAP1510_GPIO_INT_CONTROL   0x0c
 
#define OMAP1510_GPIO_INT_MASK   0x10
 
#define OMAP1510_GPIO_INT_STATUS   0x14
 
#define OMAP1510_GPIO_PIN_CONTROL   0x18
 
#define OMAP1510_IH_GPIO_BASE   64
 
#define OMAP1610_GPIO_REVISION   0x0000
 
#define OMAP1610_GPIO_SYSCONFIG   0x0010
 
#define OMAP1610_GPIO_SYSSTATUS   0x0014
 
#define OMAP1610_GPIO_IRQSTATUS1   0x0018
 
#define OMAP1610_GPIO_IRQENABLE1   0x001c
 
#define OMAP1610_GPIO_WAKEUPENABLE   0x0028
 
#define OMAP1610_GPIO_DATAIN   0x002c
 
#define OMAP1610_GPIO_DATAOUT   0x0030
 
#define OMAP1610_GPIO_DIRECTION   0x0034
 
#define OMAP1610_GPIO_EDGE_CTRL1   0x0038
 
#define OMAP1610_GPIO_EDGE_CTRL2   0x003c
 
#define OMAP1610_GPIO_CLEAR_IRQENABLE1   0x009c
 
#define OMAP1610_GPIO_CLEAR_WAKEUPENA   0x00a8
 
#define OMAP1610_GPIO_CLEAR_DATAOUT   0x00b0
 
#define OMAP1610_GPIO_SET_IRQENABLE1   0x00dc
 
#define OMAP1610_GPIO_SET_WAKEUPENA   0x00e8
 
#define OMAP1610_GPIO_SET_DATAOUT   0x00f0
 
#define OMAP7XX_GPIO_DATA_INPUT   0x00
 
#define OMAP7XX_GPIO_DATA_OUTPUT   0x04
 
#define OMAP7XX_GPIO_DIR_CONTROL   0x08
 
#define OMAP7XX_GPIO_INT_CONTROL   0x0c
 
#define OMAP7XX_GPIO_INT_MASK   0x10
 
#define OMAP7XX_GPIO_INT_STATUS   0x14
 
#define OMAP24XX_GPIO_REVISION   0x0000
 
#define OMAP24XX_GPIO_IRQSTATUS1   0x0018
 
#define OMAP24XX_GPIO_IRQSTATUS2   0x0028
 
#define OMAP24XX_GPIO_IRQENABLE2   0x002c
 
#define OMAP24XX_GPIO_IRQENABLE1   0x001c
 
#define OMAP24XX_GPIO_WAKE_EN   0x0020
 
#define OMAP24XX_GPIO_CTRL   0x0030
 
#define OMAP24XX_GPIO_OE   0x0034
 
#define OMAP24XX_GPIO_DATAIN   0x0038
 
#define OMAP24XX_GPIO_DATAOUT   0x003c
 
#define OMAP24XX_GPIO_LEVELDETECT0   0x0040
 
#define OMAP24XX_GPIO_LEVELDETECT1   0x0044
 
#define OMAP24XX_GPIO_RISINGDETECT   0x0048
 
#define OMAP24XX_GPIO_FALLINGDETECT   0x004c
 
#define OMAP24XX_GPIO_DEBOUNCE_EN   0x0050
 
#define OMAP24XX_GPIO_DEBOUNCE_VAL   0x0054
 
#define OMAP24XX_GPIO_CLEARIRQENABLE1   0x0060
 
#define OMAP24XX_GPIO_SETIRQENABLE1   0x0064
 
#define OMAP24XX_GPIO_CLEARWKUENA   0x0080
 
#define OMAP24XX_GPIO_SETWKUENA   0x0084
 
#define OMAP24XX_GPIO_CLEARDATAOUT   0x0090
 
#define OMAP24XX_GPIO_SETDATAOUT   0x0094
 
#define OMAP4_GPIO_REVISION   0x0000
 
#define OMAP4_GPIO_EOI   0x0020
 
#define OMAP4_GPIO_IRQSTATUSRAW0   0x0024
 
#define OMAP4_GPIO_IRQSTATUSRAW1   0x0028
 
#define OMAP4_GPIO_IRQSTATUS0   0x002c
 
#define OMAP4_GPIO_IRQSTATUS1   0x0030
 
#define OMAP4_GPIO_IRQSTATUSSET0   0x0034
 
#define OMAP4_GPIO_IRQSTATUSSET1   0x0038
 
#define OMAP4_GPIO_IRQSTATUSCLR0   0x003c
 
#define OMAP4_GPIO_IRQSTATUSCLR1   0x0040
 
#define OMAP4_GPIO_IRQWAKEN0   0x0044
 
#define OMAP4_GPIO_IRQWAKEN1   0x0048
 
#define OMAP4_GPIO_IRQENABLE1   0x011c
 
#define OMAP4_GPIO_WAKE_EN   0x0120
 
#define OMAP4_GPIO_IRQSTATUS2   0x0128
 
#define OMAP4_GPIO_IRQENABLE2   0x012c
 
#define OMAP4_GPIO_CTRL   0x0130
 
#define OMAP4_GPIO_OE   0x0134
 
#define OMAP4_GPIO_DATAIN   0x0138
 
#define OMAP4_GPIO_DATAOUT   0x013c
 
#define OMAP4_GPIO_LEVELDETECT0   0x0140
 
#define OMAP4_GPIO_LEVELDETECT1   0x0144
 
#define OMAP4_GPIO_RISINGDETECT   0x0148
 
#define OMAP4_GPIO_FALLINGDETECT   0x014c
 
#define OMAP4_GPIO_DEBOUNCENABLE   0x0150
 
#define OMAP4_GPIO_DEBOUNCINGTIME   0x0154
 
#define OMAP4_GPIO_CLEARIRQENABLE1   0x0160
 
#define OMAP4_GPIO_SETIRQENABLE1   0x0164
 
#define OMAP4_GPIO_CLEARWKUENA   0x0180
 
#define OMAP4_GPIO_SETWKUENA   0x0184
 
#define OMAP4_GPIO_CLEARDATAOUT   0x0190
 
#define OMAP4_GPIO_SETDATAOUT   0x0194
 
#define OMAP_MAX_GPIO_LINES   192
 
#define OMAP_MPUIO(nr)   (OMAP_MAX_GPIO_LINES + (nr))
 
#define OMAP_GPIO_IS_MPUIO(nr)   ((nr) >= OMAP_MAX_GPIO_LINES)
 

Functions

void omap2_gpio_prepare_for_idle (int off_mode)
 
void omap2_gpio_resume_after_idle (void)
 
void omap_set_gpio_debounce (int gpio, int enable)
 
void omap_set_gpio_debounce_time (int gpio, int enable)
 

Macro Definition Documentation

#define OMAP1510_GPIO_DATA_INPUT   0x00

Definition at line 56 of file gpio-omap.h.

#define OMAP1510_GPIO_DATA_OUTPUT   0x04

Definition at line 57 of file gpio-omap.h.

#define OMAP1510_GPIO_DIR_CONTROL   0x08

Definition at line 58 of file gpio-omap.h.

#define OMAP1510_GPIO_INT_CONTROL   0x0c

Definition at line 59 of file gpio-omap.h.

#define OMAP1510_GPIO_INT_MASK   0x10

Definition at line 60 of file gpio-omap.h.

#define OMAP1510_GPIO_INT_STATUS   0x14

Definition at line 61 of file gpio-omap.h.

#define OMAP1510_GPIO_PIN_CONTROL   0x18

Definition at line 62 of file gpio-omap.h.

#define OMAP1510_IH_GPIO_BASE   64

Definition at line 64 of file gpio-omap.h.

#define OMAP1610_GPIO_CLEAR_DATAOUT   0x00b0

Definition at line 82 of file gpio-omap.h.

#define OMAP1610_GPIO_CLEAR_IRQENABLE1   0x009c

Definition at line 80 of file gpio-omap.h.

#define OMAP1610_GPIO_CLEAR_WAKEUPENA   0x00a8

Definition at line 81 of file gpio-omap.h.

#define OMAP1610_GPIO_DATAIN   0x002c

Definition at line 75 of file gpio-omap.h.

#define OMAP1610_GPIO_DATAOUT   0x0030

Definition at line 76 of file gpio-omap.h.

#define OMAP1610_GPIO_DIRECTION   0x0034

Definition at line 77 of file gpio-omap.h.

#define OMAP1610_GPIO_EDGE_CTRL1   0x0038

Definition at line 78 of file gpio-omap.h.

#define OMAP1610_GPIO_EDGE_CTRL2   0x003c

Definition at line 79 of file gpio-omap.h.

#define OMAP1610_GPIO_IRQENABLE1   0x001c

Definition at line 73 of file gpio-omap.h.

#define OMAP1610_GPIO_IRQSTATUS1   0x0018

Definition at line 72 of file gpio-omap.h.

#define OMAP1610_GPIO_REVISION   0x0000

Definition at line 69 of file gpio-omap.h.

#define OMAP1610_GPIO_SET_DATAOUT   0x00f0

Definition at line 85 of file gpio-omap.h.

#define OMAP1610_GPIO_SET_IRQENABLE1   0x00dc

Definition at line 83 of file gpio-omap.h.

#define OMAP1610_GPIO_SET_WAKEUPENA   0x00e8

Definition at line 84 of file gpio-omap.h.

#define OMAP1610_GPIO_SYSCONFIG   0x0010

Definition at line 70 of file gpio-omap.h.

#define OMAP1610_GPIO_SYSSTATUS   0x0014

Definition at line 71 of file gpio-omap.h.

#define OMAP1610_GPIO_WAKEUPENABLE   0x0028

Definition at line 74 of file gpio-omap.h.

#define OMAP1_MPUIO_BASE   0xfffb5000

Definition at line 31 of file gpio-omap.h.

#define OMAP24XX_GPIO_CLEARDATAOUT   0x0090

Definition at line 120 of file gpio-omap.h.

#define OMAP24XX_GPIO_CLEARIRQENABLE1   0x0060

Definition at line 116 of file gpio-omap.h.

#define OMAP24XX_GPIO_CLEARWKUENA   0x0080

Definition at line 118 of file gpio-omap.h.

#define OMAP24XX_GPIO_CTRL   0x0030

Definition at line 106 of file gpio-omap.h.

#define OMAP24XX_GPIO_DATAIN   0x0038

Definition at line 108 of file gpio-omap.h.

#define OMAP24XX_GPIO_DATAOUT   0x003c

Definition at line 109 of file gpio-omap.h.

#define OMAP24XX_GPIO_DEBOUNCE_EN   0x0050

Definition at line 114 of file gpio-omap.h.

#define OMAP24XX_GPIO_DEBOUNCE_VAL   0x0054

Definition at line 115 of file gpio-omap.h.

#define OMAP24XX_GPIO_FALLINGDETECT   0x004c

Definition at line 113 of file gpio-omap.h.

#define OMAP24XX_GPIO_IRQENABLE1   0x001c

Definition at line 104 of file gpio-omap.h.

#define OMAP24XX_GPIO_IRQENABLE2   0x002c

Definition at line 103 of file gpio-omap.h.

#define OMAP24XX_GPIO_IRQSTATUS1   0x0018

Definition at line 101 of file gpio-omap.h.

#define OMAP24XX_GPIO_IRQSTATUS2   0x0028

Definition at line 102 of file gpio-omap.h.

#define OMAP24XX_GPIO_LEVELDETECT0   0x0040

Definition at line 110 of file gpio-omap.h.

#define OMAP24XX_GPIO_LEVELDETECT1   0x0044

Definition at line 111 of file gpio-omap.h.

#define OMAP24XX_GPIO_OE   0x0034

Definition at line 107 of file gpio-omap.h.

#define OMAP24XX_GPIO_REVISION   0x0000

Definition at line 100 of file gpio-omap.h.

#define OMAP24XX_GPIO_RISINGDETECT   0x0048

Definition at line 112 of file gpio-omap.h.

#define OMAP24XX_GPIO_SETDATAOUT   0x0094

Definition at line 121 of file gpio-omap.h.

#define OMAP24XX_GPIO_SETIRQENABLE1   0x0064

Definition at line 117 of file gpio-omap.h.

#define OMAP24XX_GPIO_SETWKUENA   0x0084

Definition at line 119 of file gpio-omap.h.

#define OMAP24XX_GPIO_WAKE_EN   0x0020

Definition at line 105 of file gpio-omap.h.

#define OMAP34XX_NR_GPIOS   6

Definition at line 51 of file gpio-omap.h.

#define OMAP4_GPIO_CLEARDATAOUT   0x0190

Definition at line 153 of file gpio-omap.h.

#define OMAP4_GPIO_CLEARIRQENABLE1   0x0160

Definition at line 149 of file gpio-omap.h.

#define OMAP4_GPIO_CLEARWKUENA   0x0180

Definition at line 151 of file gpio-omap.h.

#define OMAP4_GPIO_CTRL   0x0130

Definition at line 139 of file gpio-omap.h.

#define OMAP4_GPIO_DATAIN   0x0138

Definition at line 141 of file gpio-omap.h.

#define OMAP4_GPIO_DATAOUT   0x013c

Definition at line 142 of file gpio-omap.h.

#define OMAP4_GPIO_DEBOUNCENABLE   0x0150

Definition at line 147 of file gpio-omap.h.

#define OMAP4_GPIO_DEBOUNCINGTIME   0x0154

Definition at line 148 of file gpio-omap.h.

#define OMAP4_GPIO_EOI   0x0020

Definition at line 124 of file gpio-omap.h.

#define OMAP4_GPIO_FALLINGDETECT   0x014c

Definition at line 146 of file gpio-omap.h.

#define OMAP4_GPIO_IRQENABLE1   0x011c

Definition at line 135 of file gpio-omap.h.

#define OMAP4_GPIO_IRQENABLE2   0x012c

Definition at line 138 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUS0   0x002c

Definition at line 127 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUS1   0x0030

Definition at line 128 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUS2   0x0128

Definition at line 137 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSCLR0   0x003c

Definition at line 131 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSCLR1   0x0040

Definition at line 132 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSRAW0   0x0024

Definition at line 125 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSRAW1   0x0028

Definition at line 126 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSSET0   0x0034

Definition at line 129 of file gpio-omap.h.

#define OMAP4_GPIO_IRQSTATUSSET1   0x0038

Definition at line 130 of file gpio-omap.h.

#define OMAP4_GPIO_IRQWAKEN0   0x0044

Definition at line 133 of file gpio-omap.h.

#define OMAP4_GPIO_IRQWAKEN1   0x0048

Definition at line 134 of file gpio-omap.h.

#define OMAP4_GPIO_LEVELDETECT0   0x0140

Definition at line 143 of file gpio-omap.h.

#define OMAP4_GPIO_LEVELDETECT1   0x0144

Definition at line 144 of file gpio-omap.h.

#define OMAP4_GPIO_OE   0x0134

Definition at line 140 of file gpio-omap.h.

#define OMAP4_GPIO_REVISION   0x0000

Definition at line 123 of file gpio-omap.h.

#define OMAP4_GPIO_RISINGDETECT   0x0148

Definition at line 145 of file gpio-omap.h.

#define OMAP4_GPIO_SETDATAOUT   0x0194

Definition at line 154 of file gpio-omap.h.

#define OMAP4_GPIO_SETIRQENABLE1   0x0164

Definition at line 150 of file gpio-omap.h.

#define OMAP4_GPIO_SETWKUENA   0x0184

Definition at line 152 of file gpio-omap.h.

#define OMAP4_GPIO_WAKE_EN   0x0120

Definition at line 136 of file gpio-omap.h.

#define OMAP7XX_GPIO_DATA_INPUT   0x00

Definition at line 90 of file gpio-omap.h.

#define OMAP7XX_GPIO_DATA_OUTPUT   0x04

Definition at line 91 of file gpio-omap.h.

#define OMAP7XX_GPIO_DIR_CONTROL   0x08

Definition at line 92 of file gpio-omap.h.

#define OMAP7XX_GPIO_INT_CONTROL   0x0c

Definition at line 93 of file gpio-omap.h.

#define OMAP7XX_GPIO_INT_MASK   0x10

Definition at line 94 of file gpio-omap.h.

#define OMAP7XX_GPIO_INT_STATUS   0x14

Definition at line 95 of file gpio-omap.h.

#define OMAP_GPIO_IS_MPUIO (   nr)    ((nr) >= OMAP_MAX_GPIO_LINES)

Definition at line 159 of file gpio-omap.h.

#define OMAP_MAX_GPIO_LINES   192

Definition at line 156 of file gpio-omap.h.

#define OMAP_MPUIO (   nr)    (OMAP_MAX_GPIO_LINES + (nr))

Definition at line 158 of file gpio-omap.h.

#define OMAP_MPUIO_GPIO_DEBOUNCING   0x30

Definition at line 48 of file gpio-omap.h.

#define OMAP_MPUIO_GPIO_EVENT_MODE   0x18

Definition at line 42 of file gpio-omap.h.

#define OMAP_MPUIO_GPIO_INT   0x24

Definition at line 45 of file gpio-omap.h.

#define OMAP_MPUIO_GPIO_INT_EDGE   0x1c

Definition at line 43 of file gpio-omap.h.

#define OMAP_MPUIO_GPIO_MASKIT   0x2c

Definition at line 47 of file gpio-omap.h.

#define OMAP_MPUIO_INPUT_LATCH   0x00

Definition at line 37 of file gpio-omap.h.

#define OMAP_MPUIO_IO_CNTL   0x08

Definition at line 39 of file gpio-omap.h.

#define OMAP_MPUIO_KBC   0x14

Definition at line 41 of file gpio-omap.h.

#define OMAP_MPUIO_KBD_INT   0x20

Definition at line 44 of file gpio-omap.h.

#define OMAP_MPUIO_KBD_MASKIT   0x28

Definition at line 46 of file gpio-omap.h.

#define OMAP_MPUIO_KBR_LATCH   0x10

Definition at line 40 of file gpio-omap.h.

#define OMAP_MPUIO_LATCH   0x34

Definition at line 49 of file gpio-omap.h.

#define OMAP_MPUIO_OUTPUT   0x04

Definition at line 38 of file gpio-omap.h.

Function Documentation

void omap2_gpio_prepare_for_idle ( int  off_mode)
void omap2_gpio_resume_after_idle ( void  )
void omap_set_gpio_debounce ( int  gpio,
int  enable 
)
void omap_set_gpio_debounce_time ( int  gpio,
int  enable 
)