summaryrefslogtreecommitdiff
path: root/include/linux/mfd/stmpe.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/stmpe.h')
-rw-r--r--include/linux/mfd/stmpe.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 4a827af17e59..23e41c002dcd 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -13,6 +13,17 @@
struct device;
struct regulator;
+#define SAMPLE_TIME(x) ((x & 0xf) << 4)
+#define MOD_12B(x) ((x & 0x1) << 3)
+#define REF_SEL(x) ((x & 0x1) << 1)
+#define ADC_FREQ(x) (x & 0x3)
+#define AVE_CTRL(x) ((x & 0x3) << 6)
+#define DET_DELAY(x) ((x & 0x7) << 3)
+#define SETTLING(x) (x & 0x7)
+#define FRACTION_Z(x) (x & 0x7)
+#define I_DRIVE(x) (x & 0x1)
+#define OP_MODE(x) ((x & 0x7) << 1)
+
enum stmpe_block {
STMPE_BLOCK_GPIO = 1 << 0,
STMPE_BLOCK_KEYPAD = 1 << 1,
@@ -103,6 +114,7 @@ struct stmpe_platform_data;
* @num_gpios: number of gpios, differs for variants
* @ier: cache of IER registers for bus_lock
* @oldier: cache of IER registers for bus_lock
+ * @blocks: bitmask of blocks to enable (use STMPE_BLOCK_*)
* @pdata: platform data
*/
struct stmpe {
@@ -122,6 +134,7 @@ struct stmpe {
int num_gpios;
u8 ier[2];
u8 oldier[2];
+ unsigned int blocks;
struct stmpe_platform_data *pdata;
};