mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
focaltech_0flash_v2_mmi: disable FTS ESD check by default
focaltech_0flash_v2_mmi disable FTS ESD check by default Change-Id: Ifccb02a5b2d7ecc346e9884c210436f5df5c0ed7 Signed-off-by: hujing3 <hujing3@lenovo.com> Reviewed-on: https://gerrit.mot.com/2252208 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
de4584117f
commit
201dff4cec
7 changed files with 33 additions and 1 deletions
|
|
@ -11,6 +11,10 @@ ifneq ($(BOARD_USES_DOUBLE_TAP),)
|
|||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_0FLASH_MMI_ENABLE_DOUBLE_TAP=y
|
||||
endif
|
||||
|
||||
ifneq ($(FOCALTECH_ESDCHECK_ENABLE),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_ESD_EN=y
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_USES_PANEL_NOTIFICATIONS),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_PANEL_NOTIFICATIONS=y
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_ENABLE_DOUBLE_TAP)),)
|
|||
EXTRA_CFLAGS += -DFOCALTECH_SENSOR_EN
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_ESD_EN)),)
|
||||
EXTRA_CFLAGS += -DFOCALTECH_ESD_EN
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_PANEL_NOTIFICATIONS)),)
|
||||
EXTRA_CFLAGS += -DFOCALTECH_CONFIG_PANEL_NOTIFICATIONS
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -2005,11 +2005,12 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
ret = fts_esdcheck_init(ts_data);
|
||||
if (ret) {
|
||||
FTS_ERROR("init esd check fail");
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = fts_irq_registration(ts_data);
|
||||
if (ret) {
|
||||
|
|
@ -2133,7 +2134,9 @@ static int fts_ts_remove_entry(struct fts_ts_data *ts_data)
|
|||
fts_fwupg_exit(ts_data);
|
||||
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_exit(ts_data);
|
||||
#endif
|
||||
|
||||
#if FTS_GESTURE_EN
|
||||
fts_gesture_exit(ts_data);
|
||||
|
|
@ -2211,7 +2214,9 @@ static int fts_ts_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_suspend(ts_data);
|
||||
#endif
|
||||
|
||||
#if FTS_GESTURE_EN
|
||||
#ifdef FOCALTECH_SENSOR_EN
|
||||
|
|
@ -2288,7 +2293,9 @@ static int fts_ts_resume(struct device *dev)
|
|||
fts_wait_tp_to_valid();
|
||||
fts_ex_mode_recovery(ts_data);
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_resume(ts_data);
|
||||
#endif
|
||||
|
||||
#if FTS_GESTURE_EN
|
||||
#ifdef FOCALTECH_SENSOR_EN
|
||||
|
|
|
|||
|
|
@ -347,12 +347,14 @@ int fts_create_sysfs(struct fts_ts_data *ts_data);
|
|||
int fts_remove_sysfs(struct fts_ts_data *ts_data);
|
||||
|
||||
/* ESD */
|
||||
#if FTS_ESDCHECK_EN
|
||||
int fts_esdcheck_init(struct fts_ts_data *ts_data);
|
||||
int fts_esdcheck_exit(struct fts_ts_data *ts_data);
|
||||
void fts_esdcheck_switch(struct fts_ts_data *ts_data, bool enable);
|
||||
void fts_esdcheck_proc_busy(struct fts_ts_data *ts_data, bool proc_debug);
|
||||
void fts_esdcheck_suspend(struct fts_ts_data *ts_data);
|
||||
void fts_esdcheck_resume(struct fts_ts_data *ts_data);
|
||||
#endif
|
||||
|
||||
/* Host test */
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
*****************************************************************************/
|
||||
#include "focaltech_core.h"
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
/*****************************************************************************
|
||||
* Private constant and macro definitions using #define
|
||||
*****************************************************************************/
|
||||
|
|
@ -447,3 +448,5 @@ int fts_esdcheck_exit(struct fts_ts_data *ts_data)
|
|||
sysfs_remove_group(&ts_data->dev->kobj, &fts_esd_group);
|
||||
return 0;
|
||||
}
|
||||
#endif /* FTS_ESDCHECK_EN */
|
||||
|
||||
|
|
|
|||
|
|
@ -128,11 +128,13 @@ static ssize_t fts_debug_write(
|
|||
switch (proc->opmode) {
|
||||
case PROC_SET_TEST_FLAG:
|
||||
FTS_DEBUG("[APK]: PROC_SET_TEST_FLAG = %x", writebuf[1]);
|
||||
#if FTS_ESDCHECK_EN
|
||||
if (writebuf[1] == 0) {
|
||||
fts_esdcheck_switch(ts_data, ENABLE);
|
||||
} else {
|
||||
fts_esdcheck_switch(ts_data, DISABLE);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PROC_READ_REGISTER:
|
||||
|
|
@ -377,11 +379,13 @@ static int fts_debug_write(
|
|||
switch (proc->opmode) {
|
||||
case PROC_SET_TEST_FLAG:
|
||||
FTS_DEBUG("[APK]: PROC_SET_TEST_FLAG = %x", writebuf[1]);
|
||||
#if FTS_ESDCHECK_EN
|
||||
if (writebuf[1] == 0) {
|
||||
fts_esdcheck_switch(ts_data, ENABLE);
|
||||
} else {
|
||||
fts_esdcheck_switch(ts_data, DISABLE);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PROC_READ_REGISTER:
|
||||
|
|
|
|||
|
|
@ -699,7 +699,9 @@ static int fts_fw_download(const u8 *buf, u32 len, bool need_reset)
|
|||
|
||||
upg->ts_data->fw_loading = 1;
|
||||
fts_irq_disable();
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_switch(upg->ts_data, DISABLE);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
FTS_INFO("fw download times:%d", i + 1);
|
||||
|
|
@ -713,7 +715,10 @@ static int fts_fw_download(const u8 *buf, u32 len, bool need_reset)
|
|||
goto err_fw_download;
|
||||
}
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_switch(upg->ts_data, ENABLE);
|
||||
#endif
|
||||
|
||||
ret = 0;
|
||||
err_fw_download:
|
||||
fts_irq_enable();
|
||||
|
|
@ -1316,7 +1321,10 @@ int fts_fwupg_init(struct fts_ts_data *ts_data)
|
|||
return -ENODATA;
|
||||
}
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
fts_esdcheck_switch(ts_data, DISABLE);
|
||||
#endif
|
||||
|
||||
fwupgrade->ts_data = ts_data;
|
||||
INIT_WORK(&ts_data->fwupg_work, fts_fwupg_work);
|
||||
queue_work(ts_data->ts_workqueue, &ts_data->fwupg_work);
|
||||
|
|
|
|||
Loading…
Reference in a new issue