summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2013-12-09 13:23:53 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 14:26:12 +0100
commitd53597f8dd401f43120e07a30564f1ca642b8561 (patch)
treec0d711f13cf48b58a878e17c030b3b4b15dd7ecd /include
parent76d6f6f71f045998b5aa0759685073e21759ed79 (diff)
mfd: stmpe: add ADC block resources
In order to use the auxiliar ADC inputs of STMPE811 devices we need to add resources for the ADC block. Also move the ADC macros from the touchscreen driver to the general header file. We will need them for the ADC driver in future. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 824e28985b9cccb8906500aa20b7c33a95e6608a)
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/stmpe.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 4a827af17e59..614df4c8c437 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,