mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Add calibration noise error handler
TP: If the noise detection fails after calibration, the touch IC will report the "F3 E0" event, and when the event is received, the touch driver will send the calibration command again. Change-Id: Ifd2f4bd287fbdc7861a127d2ffd481f635d963c7 Reviewed-on: https://gerrit.mot.com/2123149 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
cf6c77763e
commit
bad4b4d393
4 changed files with 10 additions and 1 deletions
|
|
@ -218,6 +218,10 @@ int errorHandler(u8 *event, int size)
|
|||
case EVT_TYPE_ERROR_ITO_KEYOPEN:
|
||||
logError(1, "%s errorHandler: Key Open !\n", tag);
|
||||
break;
|
||||
case EVT_TYPE_ERROR_CAL_NOISE:
|
||||
logError(1, "%s errorHandler: Calibration noise check error !\n", tag);
|
||||
res = (ERROR_HANDLER_STOP_PROC | res);
|
||||
break;
|
||||
|
||||
default:
|
||||
logError(1, "%s errorHandler: No Action taken!\n", tag);
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ int fts_writeFwCmd(u8 *cmd, int cmdLength)
|
|||
ret2 = checkEcho(cmd, cmdLength);
|
||||
if (ret < OK || ret2 < OK)
|
||||
msleep(I2C_WAIT_BEFORE_RETRY);
|
||||
/* logError(1,"%s fts_writeCmd: attempt %d\n", tag, retry); */
|
||||
logError(1,"%s fts_writeCmd: attempt %d\n", tag, retry);
|
||||
}
|
||||
if (ret < 0) {
|
||||
logError(1, "%s fts_writeFwCmd: ERROR %08X\n", tag,
|
||||
|
|
|
|||
|
|
@ -443,6 +443,7 @@ typedef enum {
|
|||
* Subsection Area Header */
|
||||
#define EVT_TYPE_ERROR_CRC_CX_SUB 0xA6 /* /< CRC error in the CX
|
||||
* Subsection Area */
|
||||
#define EVT_TYPE_ERROR_CAL_NOISE 0xE0
|
||||
|
||||
#define EVT_TYPE_ERROR_ESD 0xF0 /* /< ESD error */
|
||||
/** @}*/
|
||||
|
|
|
|||
|
|
@ -533,6 +533,9 @@ static ssize_t fts_mmi_calibrate_store(struct device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* disable irq to fully control IC*/
|
||||
fts_disableInterrupt();
|
||||
|
||||
if (value == 3) {
|
||||
u8 cmd[3] = { FTS_CMD_SYSTEM, SYS_CMD_SPECIAL, SPECIAL_FULL_PANEL_INIT };
|
||||
pr_info("Sending Event [0x%02x 0x%02x 0x%02x]...\n",
|
||||
|
|
@ -549,6 +552,7 @@ static ssize_t fts_mmi_calibrate_store(struct device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
fts_enableInterrupt();
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue