focaltech_0flash_mmi: Add ESD log config

Cebu TP:
Add ESD log config, enable ESD log for Cebu ft8006s_aa.
NO_PROP_NEEDED: shm2018 Gin FT8006s_aa needn't this update.

Change-Id: If0da68cef0963d0846bcf82455cfc3d99d84c409
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1681206
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
hujing3 2020-07-14 13:02:52 +08:00 • committed by Jing Hu
commit bad4e51512
3 changed files with 28 additions and 1 deletions

View file

@ -30,6 +30,7 @@ ifneq ($(filter ft8756,$(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME)),)
endif
ifneq ($(filter ft8006s_aa,$(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME)),)
EXTRA_CFLAGS += -DCONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8006S_AA
EXTRA_CFLAGS += -DFOCALTECH_ESD_EN
focaltech_0flash_mmi-objs += focaltech_test/supported_ic/focaltech_test_ft8006sp.o
focaltech_0flash_mmi-objs += focaltech_flash_ft8006s.o
focaltech_0flash_mmi-objs += focaltech_spi_v1_1_1.o

View file

@ -178,8 +178,13 @@
* ESD check & protection
* default: disable
*/
#if defined(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8006S_AA)
#ifdef FOCALTECH_ESD_EN
#define FTS_ESDCHECK_EN 1
#if defined(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8006S_AA)
#define FTS_DEBUG_ESD_EN 1
#else
#define FTS_DEBUG_ESD_EN 0
#endif
#else
#define FTS_ESDCHECK_EN 0
#endif

View file

@ -46,6 +46,26 @@
#define ESDCHECK_WAIT_TIME 1000 /* ms */
#define LCD_ESD_PATCH 0
#if (!FTS_DEBUG_EN)
#if FTS_DEBUG_ESD_EN
#undef FTS_DEBUG
#undef FTS_FUNC_ENTER
#undef FTS_FUNC_EXIT
#define FTS_DEBUG(fmt, args...) do { \
printk("[FTS_TS]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_FUNC_ENTER() do { \
printk("[FTS_TS]%s: Enter\n", __func__); \
} while (0)
#define FTS_FUNC_EXIT() do { \
printk("[FTS_TS]%s: Exit(%d)\n", __func__, __LINE__); \
} while (0)
#endif
#endif
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
@ -283,6 +303,7 @@ static void esdcheck_func(struct work_struct *work)
fts_read_reg(FTS_REG_ESDCHECK_DISABLE, &val);
if (0xA5 == val) {
fts_esdcheck_data.mode = DISABLE;
FTS_DEBUG("[ESD]: is_incell, read REG 0x%x=0x%x\n, return", FTS_REG_ESDCHECK_DISABLE, val);
return;
}
}