diff options
author | Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com> | 2013-04-09 04:35:19 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-09 08:15:58 -0400 |
commit | 230f13a5035fd4725a6623af83953623fd51173a (patch) | |
tree | edc40619999feffbb4fa74c02d5faed228aae1b1 /drivers/mfd/stmpe.h | |
parent | e65ad41e3b3f28316565ad0061b8152a3a8227ba (diff) |
mfd: support stmpe1801 18 bits enhanced port expander
Provides support for 1801 variant of stmpe gpio port expanders.
This chip has 18 gpios configurable as GPI, GPO, keypad matrix,
special key or dedicated key function.
Note that special/dedicated key function is not supported yet.
Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/stmpe.h')
-rw-r--r-- | drivers/mfd/stmpe.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h index 7b8e13f5b764..ff2b09ba8797 100644 --- a/drivers/mfd/stmpe.h +++ b/drivers/mfd/stmpe.h | |||
@@ -199,6 +199,55 @@ int stmpe_remove(struct stmpe *stmpe); | |||
199 | #define STPME1601_AUTOSLEEP_ENABLE (1 << 3) | 199 | #define STPME1601_AUTOSLEEP_ENABLE (1 << 3) |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * STMPE1801 | ||
203 | */ | ||
204 | #define STMPE1801_ID 0xc110 | ||
205 | #define STMPE1801_NR_INTERNAL_IRQS 5 | ||
206 | #define STMPE1801_IRQ_KEYPAD_COMBI 4 | ||
207 | #define STMPE1801_IRQ_GPIOC 3 | ||
208 | #define STMPE1801_IRQ_KEYPAD_OVER 2 | ||
209 | #define STMPE1801_IRQ_KEYPAD 1 | ||
210 | #define STMPE1801_IRQ_WAKEUP 0 | ||
211 | |||
212 | #define STMPE1801_REG_CHIP_ID 0x00 | ||
213 | #define STMPE1801_REG_SYS_CTRL 0x02 | ||
214 | #define STMPE1801_REG_INT_CTRL_LOW 0x04 | ||
215 | #define STMPE1801_REG_INT_EN_MASK_LOW 0x06 | ||
216 | #define STMPE1801_REG_INT_STA_LOW 0x08 | ||
217 | #define STMPE1801_REG_INT_EN_GPIO_MASK_LOW 0x0A | ||
218 | #define STMPE1801_REG_INT_EN_GPIO_MASK_MID 0x0B | ||
219 | #define STMPE1801_REG_INT_EN_GPIO_MASK_HIGH 0x0C | ||
220 | #define STMPE1801_REG_INT_STA_GPIO_LOW 0x0D | ||
221 | #define STMPE1801_REG_INT_STA_GPIO_MID 0x0E | ||
222 | #define STMPE1801_REG_INT_STA_GPIO_HIGH 0x0F | ||
223 | #define STMPE1801_REG_GPIO_SET_LOW 0x10 | ||
224 | #define STMPE1801_REG_GPIO_SET_MID 0x11 | ||
225 | #define STMPE1801_REG_GPIO_SET_HIGH 0x12 | ||
226 | #define STMPE1801_REG_GPIO_CLR_LOW 0x13 | ||
227 | #define STMPE1801_REG_GPIO_CLR_MID 0x14 | ||
228 | #define STMPE1801_REG_GPIO_CLR_HIGH 0x15 | ||
229 | #define STMPE1801_REG_GPIO_MP_LOW 0x16 | ||
230 | #define STMPE1801_REG_GPIO_MP_MID 0x17 | ||
231 | #define STMPE1801_REG_GPIO_MP_HIGH 0x18 | ||
232 | #define STMPE1801_REG_GPIO_SET_DIR_LOW 0x19 | ||
233 | #define STMPE1801_REG_GPIO_SET_DIR_MID 0x1A | ||
234 | #define STMPE1801_REG_GPIO_SET_DIR_HIGH 0x1B | ||
235 | #define STMPE1801_REG_GPIO_RE_LOW 0x1C | ||
236 | #define STMPE1801_REG_GPIO_RE_MID 0x1D | ||
237 | #define STMPE1801_REG_GPIO_RE_HIGH 0x1E | ||
238 | #define STMPE1801_REG_GPIO_FE_LOW 0x1F | ||
239 | #define STMPE1801_REG_GPIO_FE_MID 0x20 | ||
240 | #define STMPE1801_REG_GPIO_FE_HIGH 0x21 | ||
241 | #define STMPE1801_REG_GPIO_PULL_UP_LOW 0x22 | ||
242 | #define STMPE1801_REG_GPIO_PULL_UP_MID 0x23 | ||
243 | #define STMPE1801_REG_GPIO_PULL_UP_HIGH 0x24 | ||
244 | |||
245 | #define STMPE1801_MSK_SYS_CTRL_RESET (1 << 7) | ||
246 | |||
247 | #define STMPE1801_MSK_INT_EN_KPC (1 << 1) | ||
248 | #define STMPE1801_MSK_INT_EN_GPIO (1 << 3) | ||
249 | |||
250 | /* | ||
202 | * STMPE24xx | 251 | * STMPE24xx |
203 | */ | 252 | */ |
204 | 253 | ||