mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> [[email protected]: Ported the patch from v3.12 to v3.19rc1] Signed-off-by: Vignesh R <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
448c7f3830
commit
3a59684ccc
2 changed files with 26 additions and 21 deletions
|
|
@ -86,19 +86,18 @@ static void tiadc_step_config(struct iio_dev *indio_dev)
|
|||
{
|
||||
struct tiadc_device *adc_dev = iio_priv(indio_dev);
|
||||
unsigned int stepconfig;
|
||||
int i, steps;
|
||||
int i, steps = 0;
|
||||
|
||||
/*
|
||||
* There are 16 configurable steps and 8 analog input
|
||||
* lines available which are shared between Touchscreen and ADC.
|
||||
*
|
||||
* Steps backwards i.e. from 16 towards 0 are used by ADC
|
||||
* Steps forwards i.e. from 0 towards 16 are used by ADC
|
||||
* depending on number of input lines needed.
|
||||
* Channel would represent which analog input
|
||||
* needs to be given to ADC to digitalize data.
|
||||
*/
|
||||
|
||||
steps = TOTAL_STEPS - adc_dev->channels;
|
||||
if (iio_buffer_enabled(indio_dev))
|
||||
stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1
|
||||
| STEPCONFIG_MODE_SWCNT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue