diff options
author | Super Liu <supercjliu@google.com> | 2019-06-05 11:02:22 +0800 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2019-06-05 11:02:22 +0800 |
commit | 0b15c35f4f0c17996ad33a618e4bfde6a1388056 (patch) | |
tree | 913d9b3de6c4a95cb7a4324d799480140e53bab9 | |
parent | b80139cb3eb11e1fccaafeb0bf5bfb823d5ca027 (diff) | |
download | fts_touch_s5-0b15c35f4f0c17996ad33a618e4bfde6a1388056.tar.gz |
input: touchscreen: stm: resolve flushFIFO() failed with messy events
Somehow there is the corner case will fill fifo with coordinate events
by palm or intentional trick. Therefore, add fts_system_reset() to back
touch IC original state before flushFIFO() will eliminate this error.
Error logs:
[17304.432940] [ FTS ] fts_mode_handler: Sense OFF!
[17304.433165] [ FTS ] writeSysCmd: Command = A4 00 01
[17304.433172] [ FTS ] writeSysCmd: Writing Sys command...
[17304.442835] [ FTS ] READ EVENT = 23 11 00 D3 68 2A A4 00
[17304.462823] [ FTS ] READ EVENT = 27 11 FB D2 67 35 49 01
[17304.463047] [ FTS ] READ EVENT = 43 09 00 01 0B 00 00 00
(repeated...)
[17309.422950] [ FTS ] READ EVENT = 27 11 CA 82 5F 31 79 00
[17309.432665] [ FTS ] pollForEvent: ERROR 80000007
[17309.432691] [ FTS ] checkEcho: Echo Event not found! ERROR 80000007
[17309.435183] [ FTS ] READ EVENT = 27 11 CE E2 63 36 79 00
[17309.442940] [ FTS ] READ EVENT = 27 11 D7 02 68 36 7A 00
[17309.452998] [ FTS ] READ EVENT = 27 11 E1 92 6B 36 7A 00
(repeated...)
[17314.403044] [ FTS ] READ EVENT = 27 01 18 73 5C 43 8F 00
[17314.413038] [ FTS ] READ EVENT = 27 01 08 03 5A 45 8F 00
[17314.423336] [ FTS ] READ EVENT = 27 01 E0 F2 56 3F 8E 00
[17314.433094] [ FTS ] pollForEvent: ERROR 80000007
[17314.433120] [ FTS ] checkEcho: Echo Event not found! ERROR 80000007
[17314.435619] [ FTS ] READ EVENT = 27 01 9B 12 53 38 8E 01
[17314.436020] [ FTS ] READ EVENT = 27 01 45 D2 4E 31 8D 00
[17314.446245] [ FTS ] READ EVENT = 27 01 EA A1 4A 27 2B 00
(repeated...)
[17319.532793] [ FTS ] READ EVENT = 27 01 E9 41 4A 40 9C 00
[17319.546992] [ FTS ] READ EVENT = 2B 01 20 A2 4D 5D 02 01
[17319.547173] [ FTS ] READ EVENT = 2B 01 44 E2 4F 6C 02 00
[17319.555906] [ FTS ] pollForEvent: ERROR 80000007
[17319.555917] [ FTS ] checkEcho: Echo Event not found! ERROR 80000007
[17319.557926] [ FTS ] fts_writeFwCmd: check echo ERROR 800E0007
[17319.557934] [ FTS ] writeSysCmd: ERROR 800E0007
[17319.557941] [ FTS ] flushFIFO: ERROR 800E0007
Bug: 134185999
Change-Id: Ide67ce1f5f360d72437ba07f983ba71513f309bd
Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r-- | fts.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4679,6 +4679,7 @@ static void fts_suspend_work(struct work_struct *work) fts_enableInterrupt(false); /* Flush any outstanding touch events */ + fts_system_reset(); flushFIFO(); fts_set_switch_gpio(info, FTS_SWITCH_GPIO_VALUE_SLPI_MASTER); |