summaryrefslogtreecommitdiff
path: root/tcm
diff options
context:
space:
mode:
authordavidycchen <davidycchen@google.com>2022-03-15 13:28:13 +0800
committerdavidycchen <davidycchen@google.com>2022-03-15 14:36:27 +0800
commitad2ea221a4594a90f9feb91bd9133997558f49d0 (patch)
tree533098569dc7f83ae35a369c3f466d6ab2faf6ae /tcm
parentba43ce7e908a9f7f8c234d8cf4a0aa4d4a4f87fa (diff)
downloadsynaptics_touch-ad2ea221a4594a90f9feb91bd9133997558f49d0.tar.gz
synaptics: retry when the firmware update fail
Queue the firmware update delay work again when it fails. Bug: 223725391 Test: Firmware update successfully. Signed-off-by: davidycchen <davidycchen@google.com> Change-Id: I9521fd83a78aaf7ca34372407f7fb49bf18af53f
Diffstat (limited to 'tcm')
-rw-r--r--tcm/synaptics_touchcom_func_reflash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tcm/synaptics_touchcom_func_reflash.c b/tcm/synaptics_touchcom_func_reflash.c
index 5115b73..b30eb7a 100644
--- a/tcm/synaptics_touchcom_func_reflash.c
+++ b/tcm/synaptics_touchcom_func_reflash.c
@@ -1976,6 +1976,7 @@ int syna_tcm_do_fw_update(struct tcm_dev *tcm_dev,
unsigned int wait_delay_ms, bool force_reflash)
{
int retval;
+ int retval_reset;
enum update_area type = UPDATE_NONE;
struct tcm_reflash_data_blob reflash_data;
int app_status;
@@ -2067,9 +2068,10 @@ reflash:
retval = 0;
reset:
- retval = syna_tcm_reset(tcm_dev);
- if (retval < 0) {
- LOGE("Fail to do reset\n");
+ retval_reset = syna_tcm_reset(tcm_dev);
+ if (retval_reset < 0) {
+ LOGE("Fail to do reset, retval_reset = %d\n", retval_reset);
+ retval = retval_reset;
goto exit;
}