diff options
author | Wendly Li <wendlyli@google.com> | 2023-02-16 08:36:54 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2023-02-22 06:22:54 +0000 |
commit | 9a1bdd15f21249e755ef38ce2439e6ca407ca54c (patch) | |
tree | a96d3dee384d9ae7b5986e02425204a14a7b8eec /goodix_brl_hw.c | |
parent | 01bc79a67eafe0013dbbb9843301e6e1ba8b97ac (diff) | |
download | goodix_touch-9a1bdd15f21249e755ef38ce2439e6ca407ca54c.tar.gz |
touch/goodix: fix double reset
ESD check will fail on firmware reset. When ESD check is failed, it will
reset firmware again. Skip ESD check to avoid double reset.
Double reset may cause self-test failure and other unexpected issues.
Bug: 267991839
Test: Check self-test works properly
Change-Id: I17063445e71832077766d3d9aa3e6457f4b9e4b7
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r-- | goodix_brl_hw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c index 5e282ad..505e8ec 100644 --- a/goodix_brl_hw.c +++ b/goodix_brl_hw.c @@ -324,6 +324,12 @@ static int brl_reset(struct goodix_ts_core *cd, int delay) { ts_info("chip_reset"); + /* + * ESD check will fail on firmware reset. When ESD check is failed, + * it will reset firmware again. Skip ESD check to avoid double reset. + */ + cd->ts_esd.skip_once = true; + gpio_direction_output(cd->board_data.reset_gpio, 0); usleep_range(2000, 2100); gpio_direction_output(cd->board_data.reset_gpio, 1); |