Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Variables
stmpe.h File Reference
#include <linux/device.h>
#include <linux/mfd/core.h>
#include <linux/mfd/stmpe.h>
#include <linux/printk.h>
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  stmpe_variant_block
 
struct  stmpe_variant_info
 
struct  stmpe_client_info
 

Variables

struct dev_pm_ops stmpe_dev_pm_ops
 

: part name

struct stmpe_variant_info - variant-specific information

: content of CHIPID register : bits valid in CHIPID register for comparison with id_val : number of GPIOS : number of bits used to specify the alternate function : variant specific registers. : list of blocks present on this device : number of blocks present on this device : number of internal IRQs available on this device : callback to enable the specified blocks. Called with the I/O lock held. : callback to get the alternate function number for the specific block : callback to configure autosleep with specified timeout

#define STMPE_ICR_LSB_HIGH   (1 << 2)
 
#define STMPE_ICR_LSB_EDGE   (1 << 1)
 
#define STMPE_ICR_LSB_GIM   (1 << 0)
 
#define STMPE801_ID   0x0108
 
#define STMPE801_NR_INTERNAL_IRQS   1
 
#define STMPE801_REG_CHIP_ID   0x00
 
#define STMPE801_REG_VERSION_ID   0x02
 
#define STMPE801_REG_SYS_CTRL   0x04
 
#define STMPE801_REG_GPIO_INT_EN   0x08
 
#define STMPE801_REG_GPIO_INT_STA   0x09
 
#define STMPE801_REG_GPIO_MP_STA   0x10
 
#define STMPE801_REG_GPIO_SET_PIN   0x11
 
#define STMPE801_REG_GPIO_DIR   0x12
 
#define STMPE801_REG_SYS_CTRL_RESET   (1 << 7)
 
#define STMPE801_REG_SYS_CTRL_INT_EN   (1 << 2)
 
#define STMPE801_REG_SYS_CTRL_INT_HI   (1 << 0)
 
#define STMPE811_IRQ_TOUCH_DET   0
 
#define STMPE811_IRQ_FIFO_TH   1
 
#define STMPE811_IRQ_FIFO_OFLOW   2
 
#define STMPE811_IRQ_FIFO_FULL   3
 
#define STMPE811_IRQ_FIFO_EMPTY   4
 
#define STMPE811_IRQ_TEMP_SENS   5
 
#define STMPE811_IRQ_ADC   6
 
#define STMPE811_IRQ_GPIOC   7
 
#define STMPE811_NR_INTERNAL_IRQS   8
 
#define STMPE811_REG_CHIP_ID   0x00
 
#define STMPE811_REG_SYS_CTRL2   0x04
 
#define STMPE811_REG_SPI_CFG   0x08
 
#define STMPE811_REG_INT_CTRL   0x09
 
#define STMPE811_REG_INT_EN   0x0A
 
#define STMPE811_REG_INT_STA   0x0B
 
#define STMPE811_REG_GPIO_INT_EN   0x0C
 
#define STMPE811_REG_GPIO_INT_STA   0x0D
 
#define STMPE811_REG_GPIO_SET_PIN   0x10
 
#define STMPE811_REG_GPIO_CLR_PIN   0x11
 
#define STMPE811_REG_GPIO_MP_STA   0x12
 
#define STMPE811_REG_GPIO_DIR   0x13
 
#define STMPE811_REG_GPIO_ED   0x14
 
#define STMPE811_REG_GPIO_RE   0x15
 
#define STMPE811_REG_GPIO_FE   0x16
 
#define STMPE811_REG_GPIO_AF   0x17
 
#define STMPE811_SYS_CTRL2_ADC_OFF   (1 << 0)
 
#define STMPE811_SYS_CTRL2_TSC_OFF   (1 << 1)
 
#define STMPE811_SYS_CTRL2_GPIO_OFF   (1 << 2)
 
#define STMPE811_SYS_CTRL2_TS_OFF   (1 << 3)
 
#define STMPE1601_IRQ_GPIOC   8
 
#define STMPE1601_IRQ_PWM3   7
 
#define STMPE1601_IRQ_PWM2   6
 
#define STMPE1601_IRQ_PWM1   5
 
#define STMPE1601_IRQ_PWM0   4
 
#define STMPE1601_IRQ_KEYPAD_OVER   2
 
#define STMPE1601_IRQ_KEYPAD   1
 
#define STMPE1601_IRQ_WAKEUP   0
 
#define STMPE1601_NR_INTERNAL_IRQS   9
 
#define STMPE1601_REG_SYS_CTRL   0x02
 
#define STMPE1601_REG_SYS_CTRL2   0x03
 
#define STMPE1601_REG_ICR_LSB   0x11
 
#define STMPE1601_REG_IER_LSB   0x13
 
#define STMPE1601_REG_ISR_MSB   0x14
 
#define STMPE1601_REG_CHIP_ID   0x80
 
#define STMPE1601_REG_INT_EN_GPIO_MASK_LSB   0x17
 
#define STMPE1601_REG_INT_STA_GPIO_MSB   0x18
 
#define STMPE1601_REG_GPIO_MP_LSB   0x87
 
#define STMPE1601_REG_GPIO_SET_LSB   0x83
 
#define STMPE1601_REG_GPIO_CLR_LSB   0x85
 
#define STMPE1601_REG_GPIO_SET_DIR_LSB   0x89
 
#define STMPE1601_REG_GPIO_ED_MSB   0x8A
 
#define STMPE1601_REG_GPIO_RE_LSB   0x8D
 
#define STMPE1601_REG_GPIO_FE_LSB   0x8F
 
#define STMPE1601_REG_GPIO_AF_U_MSB   0x92
 
#define STMPE1601_SYS_CTRL_ENABLE_GPIO   (1 << 3)
 
#define STMPE1601_SYS_CTRL_ENABLE_KPC   (1 << 1)
 
#define STMPE1601_SYSCON_ENABLE_SPWM   (1 << 0)
 
#define STMPE1601_AUTOSLEEP_TIMEOUT_MASK   (0x7)
 
#define STPME1601_AUTOSLEEP_ENABLE   (1 << 3)
 
#define STMPE24XX_IRQ_GPIOC   8
 
#define STMPE24XX_IRQ_PWM2   7
 
#define STMPE24XX_IRQ_PWM1   6
 
#define STMPE24XX_IRQ_PWM0   5
 
#define STMPE24XX_IRQ_ROT_OVER   4
 
#define STMPE24XX_IRQ_ROT   3
 
#define STMPE24XX_IRQ_KEYPAD_OVER   2
 
#define STMPE24XX_IRQ_KEYPAD   1
 
#define STMPE24XX_IRQ_WAKEUP   0
 
#define STMPE24XX_NR_INTERNAL_IRQS   9
 
#define STMPE24XX_REG_SYS_CTRL   0x02
 
#define STMPE24XX_REG_ICR_LSB   0x11
 
#define STMPE24XX_REG_IER_LSB   0x13
 
#define STMPE24XX_REG_ISR_MSB   0x14
 
#define STMPE24XX_REG_CHIP_ID   0x80
 
#define STMPE24XX_REG_IEGPIOR_LSB   0x18
 
#define STMPE24XX_REG_ISGPIOR_MSB   0x19
 
#define STMPE24XX_REG_GPMR_LSB   0xA5
 
#define STMPE24XX_REG_GPSR_LSB   0x85
 
#define STMPE24XX_REG_GPCR_LSB   0x88
 
#define STMPE24XX_REG_GPDR_LSB   0x8B
 
#define STMPE24XX_REG_GPEDR_MSB   0x8C
 
#define STMPE24XX_REG_GPRER_LSB   0x91
 
#define STMPE24XX_REG_GPFER_LSB   0x94
 
#define STMPE24XX_REG_GPAFR_U_MSB   0x9B
 
#define STMPE24XX_SYS_CTRL_ENABLE_GPIO   (1 << 3)
 
#define STMPE24XX_SYSCON_ENABLE_PWM   (1 << 2)
 
#define STMPE24XX_SYS_CTRL_ENABLE_KPC   (1 << 1)
 
#define STMPE24XX_SYSCON_ENABLE_ROT   (1 << 0)
 
int stmpe_probe (struct stmpe_client_info *ci, int partnum)
 
int stmpe_remove (struct stmpe *stmpe)
 

Macro Definition Documentation

#define STMPE1601_AUTOSLEEP_TIMEOUT_MASK   (0x7)

Definition at line 198 of file stmpe.h.

#define STMPE1601_IRQ_GPIOC   8

Definition at line 166 of file stmpe.h.

#define STMPE1601_IRQ_KEYPAD   1

Definition at line 172 of file stmpe.h.

#define STMPE1601_IRQ_KEYPAD_OVER   2

Definition at line 171 of file stmpe.h.

#define STMPE1601_IRQ_PWM0   4

Definition at line 170 of file stmpe.h.

#define STMPE1601_IRQ_PWM1   5

Definition at line 169 of file stmpe.h.

#define STMPE1601_IRQ_PWM2   6

Definition at line 168 of file stmpe.h.

#define STMPE1601_IRQ_PWM3   7

Definition at line 167 of file stmpe.h.

#define STMPE1601_IRQ_WAKEUP   0

Definition at line 173 of file stmpe.h.

#define STMPE1601_NR_INTERNAL_IRQS   9

Definition at line 174 of file stmpe.h.

#define STMPE1601_REG_CHIP_ID   0x80

Definition at line 181 of file stmpe.h.

#define STMPE1601_REG_GPIO_AF_U_MSB   0x92

Definition at line 191 of file stmpe.h.

#define STMPE1601_REG_GPIO_CLR_LSB   0x85

Definition at line 186 of file stmpe.h.

#define STMPE1601_REG_GPIO_ED_MSB   0x8A

Definition at line 188 of file stmpe.h.

#define STMPE1601_REG_GPIO_FE_LSB   0x8F

Definition at line 190 of file stmpe.h.

#define STMPE1601_REG_GPIO_MP_LSB   0x87

Definition at line 184 of file stmpe.h.

#define STMPE1601_REG_GPIO_RE_LSB   0x8D

Definition at line 189 of file stmpe.h.

#define STMPE1601_REG_GPIO_SET_DIR_LSB   0x89

Definition at line 187 of file stmpe.h.

#define STMPE1601_REG_GPIO_SET_LSB   0x83

Definition at line 185 of file stmpe.h.

#define STMPE1601_REG_ICR_LSB   0x11

Definition at line 178 of file stmpe.h.

#define STMPE1601_REG_IER_LSB   0x13

Definition at line 179 of file stmpe.h.

#define STMPE1601_REG_INT_EN_GPIO_MASK_LSB   0x17

Definition at line 182 of file stmpe.h.

#define STMPE1601_REG_INT_STA_GPIO_MSB   0x18

Definition at line 183 of file stmpe.h.

#define STMPE1601_REG_ISR_MSB   0x14

Definition at line 180 of file stmpe.h.

#define STMPE1601_REG_SYS_CTRL   0x02

Definition at line 176 of file stmpe.h.

#define STMPE1601_REG_SYS_CTRL2   0x03

Definition at line 177 of file stmpe.h.

#define STMPE1601_SYS_CTRL_ENABLE_GPIO   (1 << 3)

Definition at line 193 of file stmpe.h.

#define STMPE1601_SYS_CTRL_ENABLE_KPC   (1 << 1)

Definition at line 194 of file stmpe.h.

#define STMPE1601_SYSCON_ENABLE_SPWM   (1 << 0)

Definition at line 195 of file stmpe.h.

#define STMPE24XX_IRQ_GPIOC   8

Definition at line 205 of file stmpe.h.

#define STMPE24XX_IRQ_KEYPAD   1

Definition at line 212 of file stmpe.h.

#define STMPE24XX_IRQ_KEYPAD_OVER   2

Definition at line 211 of file stmpe.h.

#define STMPE24XX_IRQ_PWM0   5

Definition at line 208 of file stmpe.h.

#define STMPE24XX_IRQ_PWM1   6

Definition at line 207 of file stmpe.h.

#define STMPE24XX_IRQ_PWM2   7

Definition at line 206 of file stmpe.h.

#define STMPE24XX_IRQ_ROT   3

Definition at line 210 of file stmpe.h.

#define STMPE24XX_IRQ_ROT_OVER   4

Definition at line 209 of file stmpe.h.

#define STMPE24XX_IRQ_WAKEUP   0

Definition at line 213 of file stmpe.h.

#define STMPE24XX_NR_INTERNAL_IRQS   9

Definition at line 214 of file stmpe.h.

#define STMPE24XX_REG_CHIP_ID   0x80

Definition at line 220 of file stmpe.h.

#define STMPE24XX_REG_GPAFR_U_MSB   0x9B

Definition at line 230 of file stmpe.h.

#define STMPE24XX_REG_GPCR_LSB   0x88

Definition at line 225 of file stmpe.h.

#define STMPE24XX_REG_GPDR_LSB   0x8B

Definition at line 226 of file stmpe.h.

#define STMPE24XX_REG_GPEDR_MSB   0x8C

Definition at line 227 of file stmpe.h.

#define STMPE24XX_REG_GPFER_LSB   0x94

Definition at line 229 of file stmpe.h.

#define STMPE24XX_REG_GPMR_LSB   0xA5

Definition at line 223 of file stmpe.h.

#define STMPE24XX_REG_GPRER_LSB   0x91

Definition at line 228 of file stmpe.h.

#define STMPE24XX_REG_GPSR_LSB   0x85

Definition at line 224 of file stmpe.h.

#define STMPE24XX_REG_ICR_LSB   0x11

Definition at line 217 of file stmpe.h.

#define STMPE24XX_REG_IEGPIOR_LSB   0x18

Definition at line 221 of file stmpe.h.

#define STMPE24XX_REG_IER_LSB   0x13

Definition at line 218 of file stmpe.h.

#define STMPE24XX_REG_ISGPIOR_MSB   0x19

Definition at line 222 of file stmpe.h.

#define STMPE24XX_REG_ISR_MSB   0x14

Definition at line 219 of file stmpe.h.

#define STMPE24XX_REG_SYS_CTRL   0x02

Definition at line 216 of file stmpe.h.

#define STMPE24XX_SYS_CTRL_ENABLE_GPIO   (1 << 3)

Definition at line 232 of file stmpe.h.

#define STMPE24XX_SYS_CTRL_ENABLE_KPC   (1 << 1)

Definition at line 234 of file stmpe.h.

#define STMPE24XX_SYSCON_ENABLE_PWM   (1 << 2)

Definition at line 233 of file stmpe.h.

#define STMPE24XX_SYSCON_ENABLE_ROT   (1 << 0)

Definition at line 235 of file stmpe.h.

#define STMPE801_ID   0x0108

Definition at line 110 of file stmpe.h.

#define STMPE801_NR_INTERNAL_IRQS   1

Definition at line 111 of file stmpe.h.

#define STMPE801_REG_CHIP_ID   0x00

Definition at line 113 of file stmpe.h.

#define STMPE801_REG_GPIO_DIR   0x12

Definition at line 120 of file stmpe.h.

#define STMPE801_REG_GPIO_INT_EN   0x08

Definition at line 116 of file stmpe.h.

#define STMPE801_REG_GPIO_INT_STA   0x09

Definition at line 117 of file stmpe.h.

#define STMPE801_REG_GPIO_MP_STA   0x10

Definition at line 118 of file stmpe.h.

#define STMPE801_REG_GPIO_SET_PIN   0x11

Definition at line 119 of file stmpe.h.

#define STMPE801_REG_SYS_CTRL   0x04

Definition at line 115 of file stmpe.h.

#define STMPE801_REG_SYS_CTRL_INT_EN   (1 << 2)

Definition at line 123 of file stmpe.h.

#define STMPE801_REG_SYS_CTRL_INT_HI   (1 << 0)

Definition at line 124 of file stmpe.h.

#define STMPE801_REG_SYS_CTRL_RESET   (1 << 7)

Definition at line 122 of file stmpe.h.

#define STMPE801_REG_VERSION_ID   0x02

Definition at line 114 of file stmpe.h.

#define STMPE811_IRQ_ADC   6

Definition at line 136 of file stmpe.h.

#define STMPE811_IRQ_FIFO_EMPTY   4

Definition at line 134 of file stmpe.h.

#define STMPE811_IRQ_FIFO_FULL   3

Definition at line 133 of file stmpe.h.

#define STMPE811_IRQ_FIFO_OFLOW   2

Definition at line 132 of file stmpe.h.

#define STMPE811_IRQ_FIFO_TH   1

Definition at line 131 of file stmpe.h.

#define STMPE811_IRQ_GPIOC   7

Definition at line 137 of file stmpe.h.

#define STMPE811_IRQ_TEMP_SENS   5

Definition at line 135 of file stmpe.h.

#define STMPE811_IRQ_TOUCH_DET   0

Definition at line 130 of file stmpe.h.

#define STMPE811_NR_INTERNAL_IRQS   8

Definition at line 138 of file stmpe.h.

#define STMPE811_REG_CHIP_ID   0x00

Definition at line 140 of file stmpe.h.

#define STMPE811_REG_GPIO_AF   0x17

Definition at line 155 of file stmpe.h.

#define STMPE811_REG_GPIO_CLR_PIN   0x11

Definition at line 149 of file stmpe.h.

#define STMPE811_REG_GPIO_DIR   0x13

Definition at line 151 of file stmpe.h.

#define STMPE811_REG_GPIO_ED   0x14

Definition at line 152 of file stmpe.h.

#define STMPE811_REG_GPIO_FE   0x16

Definition at line 154 of file stmpe.h.

#define STMPE811_REG_GPIO_INT_EN   0x0C

Definition at line 146 of file stmpe.h.

#define STMPE811_REG_GPIO_INT_STA   0x0D

Definition at line 147 of file stmpe.h.

#define STMPE811_REG_GPIO_MP_STA   0x12

Definition at line 150 of file stmpe.h.

#define STMPE811_REG_GPIO_RE   0x15

Definition at line 153 of file stmpe.h.

#define STMPE811_REG_GPIO_SET_PIN   0x10

Definition at line 148 of file stmpe.h.

#define STMPE811_REG_INT_CTRL   0x09

Definition at line 143 of file stmpe.h.

#define STMPE811_REG_INT_EN   0x0A

Definition at line 144 of file stmpe.h.

#define STMPE811_REG_INT_STA   0x0B

Definition at line 145 of file stmpe.h.

#define STMPE811_REG_SPI_CFG   0x08

Definition at line 142 of file stmpe.h.

#define STMPE811_REG_SYS_CTRL2   0x04

Definition at line 141 of file stmpe.h.

#define STMPE811_SYS_CTRL2_ADC_OFF   (1 << 0)

Definition at line 157 of file stmpe.h.

#define STMPE811_SYS_CTRL2_GPIO_OFF   (1 << 2)

Definition at line 159 of file stmpe.h.

#define STMPE811_SYS_CTRL2_TS_OFF   (1 << 3)

Definition at line 160 of file stmpe.h.

#define STMPE811_SYS_CTRL2_TSC_OFF   (1 << 1)

Definition at line 158 of file stmpe.h.

#define STMPE_ICR_LSB_EDGE   (1 << 1)

Definition at line 104 of file stmpe.h.

#define STMPE_ICR_LSB_GIM   (1 << 0)

Definition at line 105 of file stmpe.h.

#define STMPE_ICR_LSB_HIGH   (1 << 2)

Definition at line 103 of file stmpe.h.

#define STPME1601_AUTOSLEEP_ENABLE   (1 << 3)

Definition at line 199 of file stmpe.h.

Function Documentation

int stmpe_probe ( struct stmpe_client_info ci,
int  partnum 
)

Definition at line 996 of file stmpe.c.

int stmpe_remove ( struct stmpe stmpe)

Definition at line 1096 of file stmpe.c.

Variable Documentation

struct dev_pm_ops stmpe_dev_pm_ops