Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2
authorDario Binacchi <dariobin@libero.it>
Mon, 13 Dec 2021 05:14:48 +0000 (21:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:35 +0000 (19:12 +0100)
commit7c93c809e00a4713f556e1e45af9b3d872504d1f
tree05db4afefe8d271e908d3e941d77ba5d0242cfc3
parent16ff93557d1e65ca02e40227dcfb121ca0320e6e
Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2

[ Upstream commit 6bfeb6c21e1bdc11c328b7d996d20f0f73c6b9b0 ]

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: 8c896308feae ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/ti_am335x_tsc.c