Skip to content

Commit fa9f427

Browse files
Luca Ellerodtor
authored andcommitted
Input: ads7846 - don't check penirq immediately for 7845
To discard false readings, one should use "ti,penirq-recheck-delay-usecs". Checking get_pendown_state() at the beginning, most of the time fails causing malfunctioning. Fixes: ffa458c ("spi: ads7846 driver") Signed-off-by: Luca Ellero <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 13f82ca commit fa9f427

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/input/touchscreen/ads7846.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -843,14 +843,8 @@ static void ads7846_report_state(struct ads7846 *ts)
843843
if (x == MAX_12BIT)
844844
x = 0;
845845

846-
if (ts->model == 7843) {
846+
if (ts->model == 7843 || ts->model == 7845) {
847847
Rt = ts->pressure_max / 2;
848-
} else if (ts->model == 7845) {
849-
if (get_pendown_state(ts))
850-
Rt = ts->pressure_max / 2;
851-
else
852-
Rt = 0;
853-
dev_vdbg(&ts->spi->dev, "x/y: %d/%d, PD %d\n", x, y, Rt);
854848
} else if (likely(x && z1)) {
855849
/* compute touch pressure resistance using equation #2 */
856850
Rt = z2;

0 commit comments

Comments
 (0)