[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211125224642.21011-3-dariobin@libero.it>
Date: Thu, 25 Nov 2021 23:46:40 +0100
From: Dario Binacchi <dariobin@...ero.it>
To: linux-kernel@...r.kernel.org
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-input@...r.kernel.org, Felipe Balbi <balbi@...com>,
Zubair Lutfullah <zubair.lutfullah@...il.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Dave Gerlach <d-gerlach@...com>,
"Andrew F . Davis" <afd@...com>, Vignesh R <vigneshr@...com>,
Lee Jones <lee.jones@...aro.org>,
Wolfram Sang <wsa@...nel.org>, Brad Griffis <bgriffis@...com>,
Jeff Lance <j-lance1@...com>, Rachna Patil <rachna@...com>,
Dario Binacchi <dariobin@...ero.it>
Subject: [PATCH v2 2/4] 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: 8c896308fea ("input: ti_am335x_adc: use only FIFO0 and clean up a little")
Signed-off-by: Dario Binacchi <dariobin@...ero.it>
---
(no changes since v1)
drivers/input/touchscreen/ti_am335x_tsc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index fd3ffdd23470..cfc943423241 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -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);
--
2.17.1
Powered by blists - more mailing lists