Skip to content

Commit 6bfeb6c

Browse files
passgatdtor
authored andcommitted
Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2
The Z2 step configuration doesn't erase the SEL_INP_SWC_3_0 bit-field before setting the ADC channel. This way its value could be corrupted by the ADC channel selected for the Z1 coordinate. Fixes: 8c89630 ("input: ti_am335x_adc: use only FIFO0 and clean up a little") Signed-off-by: Dario Binacchi <dariobin@libero.it> Link: https://lore.kernel.org/r/20211212125358.14416-3-dariobin@libero.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 73cca71 commit 6bfeb6c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/input/touchscreen/ti_am335x_tsc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ static void titsc_step_config(struct titsc *ts_dev)
196196
STEPCONFIG_OPENDLY);
197197

198198
end_step++;
199-
config |= STEPCONFIG_INP(ts_dev->inp_yn);
199+
config = STEPCONFIG_MODE_HWSYNC |
200+
STEPCONFIG_AVG_16 | ts_dev->bit_yp |
201+
ts_dev->bit_xn | STEPCONFIG_INM_ADCREFM |
202+
STEPCONFIG_INP(ts_dev->inp_yn);
200203
titsc_writel(ts_dev, REG_STEPCONFIG(end_step), config);
201204
titsc_writel(ts_dev, REG_STEPDELAY(end_step),
202205
STEPCONFIG_OPENDLY);

0 commit comments

Comments
 (0)