aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc00187401 <c00187401@notesmail.huawei.com>2017-03-22 19:27:28 +0800
committerZhang Wei <zhangwei519@huawei.com>2017-03-22 20:47:01 +0800
commit079c16f43a5398bdc46aa8c25980f3918f2a9107 (patch)
tree4b9dadd4409662108b208e887be02887f0a20752
parent798d184d526072c9045929ca5ba2775fb92a3485 (diff)
Input TP: Modify the TP in the wake of the problem does not respondandroid-wear-7.1.1_r0.8
In the process of repeated sleep and wake up ,sometime TP firmware will not be able to respond to the AP's TP driver. So it should be in the wake up function to do abnormal detection. When the TP exception occurs, the TP driver reset TP firmware. Change-Id: Ic6175981238cf80380b8d27c5d1b1e93e50c6397
-rwxr-xr-x[-rw-r--r--]drivers/input/touchscreen/cyttsp5_cs445a/cyttsp5_core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/cyttsp5_cs445a/cyttsp5_core.c b/drivers/input/touchscreen/cyttsp5_cs445a/cyttsp5_core.c
index 0a73be33a460..1f5c8642a95d 100644..100755
--- a/drivers/input/touchscreen/cyttsp5_cs445a/cyttsp5_core.c
+++ b/drivers/input/touchscreen/cyttsp5_cs445a/cyttsp5_core.c
@@ -51,6 +51,8 @@ extern struct dsm_client *tp_cyp_dclient;
extern ssize_t cyttsp5_dsm_record_basic_err_info(struct device *dev);
extern int cyttsp5_tp_report_dsm_err(struct device *dev, int type, int err_numb);
#endif/*CONFIG_HUAWEI_DSM*/
+static int _fast_startup(struct cyttsp5_core_data *cd);
+
struct device *gdev = NULL;
struct device *cyttsp5_core_dev = NULL;
struct cyttsp5_hid_field {
@@ -4309,7 +4311,13 @@ static int cyttsp5_core_wake_device_from_easy_wakeup_(
cd->easy_wakeup_gesture, &status);
if (rc || status == 1){
tp_log_err("%s: failed, rc=%d, status=%d\n", __func__, rc, status);
- return -EBUSY;
+ rc = cyttsp5_reset_and_wait(cd);
+ if (rc < 0) {
+ dev_err(cd->dev, "%s: Error on h/w reset r=%d\n",__func__, rc);
+ return rc;
+ }
+ _fast_startup(cd);
+ return 0;
}
if (device_may_wakeup(cd->dev)) {