diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2013-12-09 13:23:53 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:25 +0100 |
commit | 76187654774f21989a7dca30e080d683da5a5516 (patch) | |
tree | d0f4567e60bc58595aa8bb09ace483f2620a1bd7 /include | |
parent | 09a518b93bf7cbe72f3ebf08f5c42ba90388682f (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.h | 11 |
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, |