Commit 6bfeb6c2 authored by Dario Binacchi's avatar Dario Binacchi Committed by Dmitry Torokhov

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: 8c896308 ("input: ti_am335x_adc: use only FIFO0 and clean up a little")
Signed-off-by: default avatarDario Binacchi <dariobin@libero.it>
Link: https://lore.kernel.org/r/20211212125358.14416-3-dariobin@libero.itSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 73cca71a
......@@ -196,7 +196,10 @@ static void titsc_step_config(struct titsc *ts_dev)
STEPCONFIG_OPENDLY);
end_step++;
config |= STEPCONFIG_INP(ts_dev->inp_yn);
config = STEPCONFIG_MODE_HWSYNC |
STEPCONFIG_AVG_16 | ts_dev->bit_yp |
ts_dev->bit_xn | STEPCONFIG_INM_ADCREFM |
STEPCONFIG_INP(ts_dev->inp_yn);
titsc_writel(ts_dev, REG_STEPCONFIG(end_step), config);
titsc_writel(ts_dev, REG_STEPDELAY(end_step),
STEPCONFIG_OPENDLY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment