mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
touch:nt36xxx: add ESD config
Capri: NT36525b touch driver need enable ESD Add ESD config support NO_PROP_NEEDED: needn't for shm2018 Change-Id: I964e4260c833655ce19b6c010b86Montana46d0e8246 Signed-off-by: hujing3 <hujing3@lenovo.com> Reviewed-on: https://gerrit.mot.com/1778506 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
bd5bc163eb
commit
2aadc564c3
5 changed files with 22 additions and 1 deletions
|
|
@ -23,6 +23,10 @@ ifeq ($(CONFIG_INPUT_NOVA_USES_CHIP_VER_1),true)
|
|||
KERNEL_CFLAGS += CONFIG_INPUT_NOVA_CHIP_VER_1=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INPUT_NOVA_ESD_ENABLE),true)
|
||||
KERNEL_CFLAGS += CONFIG_NOVA_ESD_ENABLE=y
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_USES_PEN_NOTIFIER),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_NOVA_0FLASH_MMI_PEN_NOTIFIER=y
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_CHIP_VER_1)),)
|
|||
EXTRA_CFLAGS += -DNVT_CONFIG_CHIP_VER_1
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_NOVA_ESD_ENABLE)),)
|
||||
EXTRA_CFLAGS += -DNVT_CONFIG_ESD_ENABLE
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_STYLUS_PALM)),)
|
||||
EXTRA_CFLAGS += -DPALM_GESTURE
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = {
|
|||
#endif
|
||||
|
||||
#if NVT_TOUCH_ESD_PROTECT
|
||||
static struct delayed_work nvt_esd_check_work;
|
||||
struct delayed_work nvt_esd_check_work;
|
||||
static struct workqueue_struct *nvt_esd_check_wq;
|
||||
static unsigned long irq_timer = 0;
|
||||
uint8_t esd_check = false;
|
||||
|
|
|
|||
|
|
@ -126,10 +126,18 @@ extern const uint16_t gesture_key_array[];
|
|||
#define POINT_DATA_CHECKSUM_LEN 65
|
||||
#define NVT_FILE_NAME_LENGTH 128
|
||||
//---ESD Protect.---
|
||||
#ifdef NVT_CONFIG_ESD_ENABLE
|
||||
#define NVT_TOUCH_ESD_PROTECT 1
|
||||
#else
|
||||
#define NVT_TOUCH_ESD_PROTECT 0
|
||||
#endif
|
||||
#define NVT_TOUCH_ESD_CHECK_PERIOD 1500 /* ms */
|
||||
#define NVT_TOUCH_WDT_RECOVERY 1
|
||||
|
||||
#if NVT_TOUCH_ESD_PROTECT
|
||||
extern struct delayed_work nvt_esd_check_work;
|
||||
#endif
|
||||
|
||||
#ifdef NVT_SENSOR_EN
|
||||
/* display state */
|
||||
enum display_state {
|
||||
|
|
|
|||
|
|
@ -562,6 +562,11 @@ static ssize_t nvt_fwupdate_read(struct file *file, char __user *buff, size_t co
|
|||
}
|
||||
|
||||
#if NVT_TOUCH_ESD_PROTECT
|
||||
/*
|
||||
* stop esd check work to avoid case that 0x77 report righ after here to enable esd check again
|
||||
* finally lead to trigger esd recovery bootloader reset
|
||||
*/
|
||||
cancel_delayed_work_sync(&nvt_esd_check_work);
|
||||
nvt_esd_check_enable(false);
|
||||
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue