summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2018-12-21 14:46:31 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-09 22:45:39 +0100
commit4b5525199c0f5c38279a9a256d0e4736609e26eb (patch)
treed0cc06524143642aa514cc5621c6a5746b70dc6f /include
parentc8e5c12063fb1f00c38f0bb1869117154b85e165 (diff)
mfd: stmpe: Move ADC related defines to MFD header
Move defines that are ADC related to the header of the overlying MFD, so they can be used from multiple sub-devices. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> (cherry picked from commit 063755ab1d1c1127adc09703185967862584935b)
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..c0353f6431f9 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -10,6 +10,17 @@
#include <linux/mutex.h>
+#define STMPE_SAMPLE_TIME(x) ((x & 0xf) << 4)
+#define STMPE_MOD_12B(x) ((x & 0x1) << 3)
+#define STMPE_REF_SEL(x) ((x & 0x1) << 1)
+#define STMPE_ADC_FREQ(x) (x & 0x3)
+#define STMPE_AVE_CTRL(x) ((x & 0x3) << 6)
+#define STMPE_DET_DELAY(x) ((x & 0x7) << 3)
+#define STMPE_SETTLING(x) (x & 0x7)
+#define STMPE_FRACTION_Z(x) (x & 0x7)
+#define STMPE_I_DRIVE(x) (x & 0x1)
+#define STMPE_OP_MODE(x) ((x & 0x7) << 1)
+
struct device;
struct regulator;