Skip to content

Commit 42bcead

Browse files
6by9pelwell
authored andcommitted
input: goodix: Don't retry individual reads when polling
Some Goodix controllers report the buffer isn't ready continuously when there are no touch points to report. That triggers the retry mechanism within the driver required as supposedly the data can be 10ms after the interrupt occurs. Seeing as we don't have an interrupt there is little point in retrying, and we can wait for the next poll event. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 84ce3ce commit 42bcead

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,14 @@ static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data)
299299
return 0;
300300
}
301301

302+
if (!ts->client->irq)
303+
/*
304+
* No point in retrying if polling, particularly as some
305+
* versions continuously report "not ready" if there are
306+
* no touch points.
307+
*/
308+
break;
309+
302310
usleep_range(1000, 2000); /* Poll every 1 - 2 ms */
303311
} while (time_before(jiffies, max_timeout));
304312

0 commit comments

Comments
 (0)