diff options
author | Steve Pfetsch <spfetsch@google.com> | 2019-06-12 18:34:35 -0700 |
---|---|---|
committer | Steve Pfetsch <spfetsch@google.com> | 2019-06-12 18:44:39 -0700 |
commit | 031d23279d36b4b4fd712db00ae0059a2af04a34 (patch) | |
tree | c12c66ed6a7c138145ccb02bd049719a0524b61b | |
parent | 0b15c35f4f0c17996ad33a618e4bfde6a1388056 (diff) | |
download | fts_touch_s5-031d23279d36b4b4fd712db00ae0059a2af04a34.tar.gz |
input: touchscreen: fts: reduce timeout waiting for FIFO flush echo
In some cases, the flushFIFO command waits for 5s for completion,
times out, then repeats the command and wait two more times. This can
result in a total of 15s delay at a time when the touch IC appears to be
unresponsive during suspend, so drastically shorten the echo delay to
50ms per attempt. This does not solve the underlying problem but should
improve the user experience when it does occur.
Bug: 134638807
Change-Id: I4d58020170009dd1a241f73d19047ac7e1786400
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
-rw-r--r-- | fts_lib/ftsCore.c | 5 | ||||
-rw-r--r-- | fts_lib/ftsTime.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/fts_lib/ftsCore.c b/fts_lib/ftsCore.c index 3e470c2..b8d0af1 100644 --- a/fts_lib/ftsCore.c +++ b/fts_lib/ftsCore.c @@ -326,6 +326,11 @@ int checkEcho(u8 *cmd, int size) (cmd[1] == SYS_CMD_CX_TUNING)) ret = pollForEvent(event_to_search, size + 2, readData, TIMEOUT_ECHO_SINGLE_ENDED_SPECIAL_AUTOTUNE); + else if (cmd[0] == FTS_CMD_SYSTEM && + cmd[1] == SYS_CMD_SPECIAL && + cmd[2] == SPECIAL_FIFO_FLUSH) + ret = pollForEvent(event_to_search, size + 2, readData, + TIMEOUT_ECHO_FLUSH); else ret = pollForEvent(event_to_search, size + 2, readData, TIEMOUT_ECHO); diff --git a/fts_lib/ftsTime.h b/fts_lib/ftsTime.h index 314cbf8..ffdf66a 100644 --- a/fts_lib/ftsTime.h +++ b/fts_lib/ftsTime.h @@ -48,6 +48,8 @@ /* /< timeout to perform initialization test in ms */ #define TIEMOUT_ECHO (50 * TIMEOUT_RESOLUTION) /* /< timeout of the echo command,*/ +#define TIMEOUT_ECHO_FLUSH (TIMEOUT_RESOLUTION) +/* /< timeout of the flush echo command,*/ #define TIMEOUT_ECHO_FPI (200 * TIMEOUT_RESOLUTION) /* /< timeout of the Full panel Init echo command */ #define TIMEOUT_ECHO_SINGLE_ENDED_SPECIAL_AUTOTUNE \ |