diff options
author | Brad Griffis <bgriffis@ti.com> | 2015-02-03 14:41:58 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-03 14:50:37 -0500 |
commit | 3a59684ccc5d529e7e9ce8b068889dbaa4c34e9b (patch) | |
tree | a7cdee1b66db17d7b071e3517128d00e1bc4d0b6 /drivers/iio | |
parent | 448c7f3830ca283e485aa943279acea6bde8b270 (diff) |
Input: ti_am335x_tsc - interchange touchscreen and ADC steps
This patch makes the initial changes required to workaround TSC-false
pen-up interrupts. It is required to implement these changes in order to
remove udelay in the TSC interrupt handler and false pen-up events. The
charge step is to be executed immediately after sampling X+. Hence TSC is
made to use higher numbered steps (steps 5 to 16 for 5 co-ordinate
readouts, 4 wire TSC configuration) and ADC to use lower ones. Further X
co-ordinate readouts must be the last to be sampled, thus co-ordinates are
sampled in the order Y-Z-X.
Signed-off-by: Brad Griffis <bgriffis@ti.com>
[vigneshr@ti.com: Ported the patch from v3.12 to v3.19rc1]
Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index b730864731e8..adba23246474 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c | |||
@@ -86,19 +86,18 @@ static void tiadc_step_config(struct iio_dev *indio_dev) | |||
86 | { | 86 | { |
87 | struct tiadc_device *adc_dev = iio_priv(indio_dev); | 87 | struct tiadc_device *adc_dev = iio_priv(indio_dev); |
88 | unsigned int stepconfig; | 88 | unsigned int stepconfig; |
89 | int i, steps; | 89 | int i, steps = 0; |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * There are 16 configurable steps and 8 analog input | 92 | * There are 16 configurable steps and 8 analog input |
93 | * lines available which are shared between Touchscreen and ADC. | 93 | * lines available which are shared between Touchscreen and ADC. |
94 | * | 94 | * |
95 | * Steps backwards i.e. from 16 towards 0 are used by ADC | 95 | * Steps forwards i.e. from 0 towards 16 are used by ADC |
96 | * depending on number of input lines needed. | 96 | * depending on number of input lines needed. |
97 | * Channel would represent which analog input | 97 | * Channel would represent which analog input |
98 | * needs to be given to ADC to digitalize data. | 98 | * needs to be given to ADC to digitalize data. |
99 | */ | 99 | */ |
100 | 100 | ||
101 | steps = TOTAL_STEPS - adc_dev->channels; | ||
102 | if (iio_buffer_enabled(indio_dev)) | 101 | if (iio_buffer_enabled(indio_dev)) |
103 | stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1 | 102 | stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1 |
104 | | STEPCONFIG_MODE_SWCNT; | 103 | | STEPCONFIG_MODE_SWCNT; |