mako: touch: ignore abnormal touch interrupt
When the touch driver detected an interrupt, it checks the interrupt
status register. If the value of the register is not normal,
such as zero, the touch driver considered it as a problem on the
device and reinitialized the touch device to recover.
This should not happen with normal touch firmware but, the touch
driver also need to ignore this kind of abnormal interrupt
rather than resetting the device, which causing unexpected freezing
during touch operation.
Change-Id: I989a9eab594f34ed9a32cea3e477faed38e32029
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/drivers/input/touchscreen/touch_synaptics.c b/drivers/input/touchscreen/touch_synaptics.c
index 78a3656..b27ac1b 100644
--- a/drivers/input/touchscreen/touch_synaptics.c
+++ b/drivers/input/touchscreen/touch_synaptics.c
@@ -201,9 +201,8 @@
/* IC bug Exception handling - Interrupt status reg is 0 when interrupt occur */
if (ts->ts_data.interrupt_status_reg == 0) {
- TOUCH_ERR_MSG("Interrupt_status reg is 0. "
- "Something is wrong in IC\n");
- goto err_synaptics_device_damage;
+ TOUCH_ERR_MSG("Interrupt_status reg is 0. -> ignore\n");
+ goto err_synaptics_ignore;
}
/* Because of ESD damage... */
@@ -330,6 +329,8 @@
err_synaptics_device_damage:
err_synaptics_getdata:
return -EIO;
+err_synaptics_ignore:
+ return -EINVAL;
}
static int read_page_description_table(struct i2c_client* client)
@@ -483,7 +484,7 @@
}
ts->ic_panel_type = IC7020_G2_H_PTN;
- TOUCH_INFO_MSG("IC is 7020, H pattern, panel is G2.");
+ TOUCH_INFO_MSG("IC is 7020, H pattern, panel is G2, Firmware: %s.", fw_info->fw_version);
#if defined(ARRAYED_TOUCH_FW_BIN)
for (cnt = 0; cnt < sizeof(SynaFirmware)/sizeof(SynaFirmware[0]); cnt++) {