aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/stmpe.h
diff options
context:
space:
mode:
authorSundar R Iyer <sundar.iyer@stericsson.com>2010-07-21 02:11:07 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-12 05:28:00 -0400
commit5981f4e65cb455a820b3d07b8e4bac506233f3ea (patch)
tree541a0ba41593bda73d1ce9b3ce004de43dcccd85 /drivers/mfd/stmpe.h
parent3faeb35ccc57e1af70c54b82063fdf4a88846084 (diff)
mfd: Add stmpe auto sleep feature
Some STMPE devices support entering sleep mode automatically on a specified timeout of inactivity on the I2C bus with the host system. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/stmpe.h')
-rw-r--r--drivers/mfd/stmpe.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
index 991f0ecbeb3..0dbdc4e8cd7 100644
--- a/drivers/mfd/stmpe.h
+++ b/drivers/mfd/stmpe.h
@@ -49,6 +49,7 @@ struct stmpe_variant_block {
49 * Called with the I/O lock held. 49 * Called with the I/O lock held.
50 * @get_altfunc: callback to get the alternate function number for the 50 * @get_altfunc: callback to get the alternate function number for the
51 * specific block 51 * specific block
52 * @enable_autosleep: callback to configure autosleep with specified timeout
52 */ 53 */
53struct stmpe_variant_info { 54struct stmpe_variant_info {
54 const char *name; 55 const char *name;
@@ -62,6 +63,7 @@ struct stmpe_variant_info {
62 int num_irqs; 63 int num_irqs;
63 int (*enable)(struct stmpe *stmpe, unsigned int blocks, bool enable); 64 int (*enable)(struct stmpe *stmpe, unsigned int blocks, bool enable);
64 int (*get_altfunc)(struct stmpe *stmpe, enum stmpe_block block); 65 int (*get_altfunc)(struct stmpe *stmpe, enum stmpe_block block);
66 int (*enable_autosleep)(struct stmpe *stmpe, int autosleep_timeout);
65}; 67};
66 68
67#define STMPE_ICR_LSB_HIGH (1 << 2) 69#define STMPE_ICR_LSB_HIGH (1 << 2)
@@ -118,6 +120,7 @@ struct stmpe_variant_info {
118#define STMPE1601_NR_INTERNAL_IRQS 9 120#define STMPE1601_NR_INTERNAL_IRQS 9
119 121
120#define STMPE1601_REG_SYS_CTRL 0x02 122#define STMPE1601_REG_SYS_CTRL 0x02
123#define STMPE1601_REG_SYS_CTRL2 0x03
121#define STMPE1601_REG_ICR_LSB 0x11 124#define STMPE1601_REG_ICR_LSB 0x11
122#define STMPE1601_REG_IER_LSB 0x13 125#define STMPE1601_REG_IER_LSB 0x13
123#define STMPE1601_REG_ISR_MSB 0x14 126#define STMPE1601_REG_ISR_MSB 0x14
@@ -137,6 +140,10 @@ struct stmpe_variant_info {
137#define STMPE1601_SYS_CTRL_ENABLE_KPC (1 << 1) 140#define STMPE1601_SYS_CTRL_ENABLE_KPC (1 << 1)
138#define STMPE1601_SYSCON_ENABLE_SPWM (1 << 0) 141#define STMPE1601_SYSCON_ENABLE_SPWM (1 << 0)
139 142
143/* The 1601/2403 share the same masks */
144#define STMPE1601_AUTOSLEEP_TIMEOUT_MASK (0x7)
145#define STPME1601_AUTOSLEEP_ENABLE (1 << 3)
146
140/* 147/*
141 * STMPE24xx 148 * STMPE24xx
142 */ 149 */