summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-05-05 18:36:46 +0800
committerCommit Bot <commit-bot@chromium.org>2021-05-05 18:11:28 +0000
commit2e9745e37796083f0651adc1bdeb5faa200574a5 (patch)
treec03a4232f3067767b7a05cac8fd52e3a803fd145
parentf11262b8a4c3753912af8c6bf5360ba015887a5d (diff)
downloadchrome-ec-2e9745e37796083f0651adc1bdeb5faa200574a5.tar.gz
touchpad_elan: ignore unknown ic_type
Unknown ic_type is not a fatal error, it only affects fw update, but not other usual touchpad functions. We can ignore this error to keep touchpad working. BUG=none TEST=EC able to ignore the unknown ic type error [1.299220 elan_tp_init: ic_type:1500.] [1.299820 elan_tp_init: iap_version:0204.] [1.299976 unknown ic_type: 21] [1.302292 max=3282/1793 width=82/76 adj=0 dpi=800/800] [1.302570 *** TP mismatch!] [1.303245 elan_tp_init:0] BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ic0471989bb669482deee973c0e4495a65f6928f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2874947 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--driver/touchpad_elan.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c
index 06a6b1ed13..6df4f0f7de 100644
--- a/driver/touchpad_elan.c
+++ b/driver/touchpad_elan.c
@@ -277,7 +277,7 @@ static int elan_tp_read_report(void)
return 0;
}
-static int elan_get_fwinfo(void)
+static void elan_get_fwinfo(void)
{
uint16_t ic_type = elan_tp_params.ic_type;
uint16_t iap_version = elan_tp_params.iap_version;
@@ -296,8 +296,8 @@ static int elan_get_fwinfo(void)
elan_tp_params.page_count = 1024;
break;
default:
+ elan_tp_params.page_count = -1;
CPRINTS("unknown ic_type: %d", ic_type);
- return EC_ERROR_UNKNOWN;
}
if ((ic_type == 0x14 || ic_type == 0x15) && iap_version >= 2) {
@@ -309,8 +309,6 @@ static int elan_get_fwinfo(void)
} else {
elan_tp_params.page_size = 64;
}
-
- return EC_SUCCESS;
}
/*
@@ -355,9 +353,7 @@ static void elan_tp_init(void)
if (rv)
goto out;
- rv = elan_get_fwinfo();
- if (rv)
- goto out;
+ elan_get_fwinfo();
/* Read min/max */
rv = elan_tp_read_cmd(ETP_I2C_MAX_X_AXIS_CMD, &elan_tp_params.max_x);