diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-10-15 10:14:54 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-10-21 09:23:52 +0100 |
commit | 0a1233031c16d8575be6b864e6fd353b6fd758c4 (patch) | |
tree | 0256a8425c378a8f40d452433b3d37ffeef3a6fe /include/linux/mfd | |
parent | bf0f394c7b1e4d623ca2afdf59b3b4b95cc6f592 (diff) | |
download | linux-0a1233031c16d8575be6b864e6fd353b6fd758c4.tar.gz linux-0a1233031c16d8575be6b864e6fd353b6fd758c4.tar.bz2 linux-0a1233031c16d8575be6b864e6fd353b6fd758c4.zip |
mfd: ti_am335x_tscadc: Add ADC1/magnetic reader support
Introduce a new compatible that has another set of driver data,
targeting am437x SoCs with a magnetic reader instead of the
touchscreen and a more featureful set of registers.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211015081506.933180-37-miquel.raynal@bootlin.com
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index ee160b2036c1..5225e3fc194d 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h @@ -106,6 +106,11 @@ #define CNTRLREG_TSC_8WIRE CNTRLREG_TSC_AFE_CTRL(3) #define CNTRLREG_TSC_ENB BIT(7) +/*Control registers bitfields for MAGADC IP */ +#define CNTRLREG_MAGADCENB BIT(0) +#define CNTRLREG_MAG_PREAMP_PWRDOWN BIT(5) +#define CNTRLREG_MAG_PREAMP_BYPASS BIT(6) + /* FIFO READ Register */ #define FIFOREAD_DATA_MASK GENMASK(11, 0) #define FIFOREAD_CHNLID_MASK GENMASK(19, 16) @@ -119,6 +124,7 @@ #define CHARGE_STEP 0x11 #define TSC_ADC_CLK (3 * HZ_PER_MHZ) +#define MAG_ADC_CLK (13 * HZ_PER_MHZ) #define TOTAL_STEPS 16 #define TOTAL_CHANNELS 8 #define FIFO1_THRESHOLD 19 |