summaryrefslogtreecommitdiff
path: root/goodix_brl_hw.c
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2023-03-20 01:54:16 +0000
committerSuper Liu <supercjliu@google.com>2023-03-29 07:02:23 +0000
commit7f830ba346f172da79d4ec51fa1fdf33c247cd46 (patch)
tree7ee69e9f94b4c929a94bb2692b8f87feb2b4372e /goodix_brl_hw.c
parent99ab2adb1fef76ee95d9330a14f468f21907e023 (diff)
downloadgoodix_touch-7f830ba346f172da79d4ec51fa1fdf33c247cd46.tar.gz
touch/goodix: Skip boot check to force FW update
For early sample without CG, the return value from BOOTOPTION_ADDR(0x10000) will not be DEV_CONFIRM_VAL(0xAA). Therefore, add one DTS option to skip the boot check to avoid probe termination. Bug: 272408020 Change-Id: I0efd02932e8add17b23d1cacd9712eb67a3e1738 Signed-off-by: Super Liu <supercjliu@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r--goodix_brl_hw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c
index cb073e1..b6b3ff0 100644
--- a/goodix_brl_hw.c
+++ b/goodix_brl_hw.c
@@ -92,6 +92,7 @@ static int brl_dev_confirm(struct goodix_ts_core *cd)
ret = hw_ops->read(cd, BOOTOPTION_ADDR, rx_buf, sizeof(rx_buf));
if (ret < 0)
return ret;
+ ts_info("device confirm val: %*ph.", sizeof(rx_buf), rx_buf); /* [GOOG] */
if (!memcmp(tx_buf, rx_buf, sizeof(tx_buf)))
break;
usleep_range(5000, 5100);
@@ -231,8 +232,12 @@ static int brl_power_on(struct goodix_ts_core *cd, bool on)
gpio_direction_output(reset_gpio, 1);
usleep_range(4000, 4100);
ret = brl_dev_confirm(cd);
+/* [GOOG]
+ * Skip the check brl_dev_confirm() as FW recovery mechanism
+ * to force FW update(if possible).
if (ret < 0)
goto power_off;
+*/
ret = brl_reset_after(cd);
if (ret < 0)
goto power_off;