From 692eebb12322fd12833f0341f3041729e29cf344 Mon Sep 17 00:00:00 2001 From: haojl2 Date: Wed, 21 Aug 2019 21:37:55 +0800 Subject: [PATCH] input: ets_fpc_mmi: prevent irq not been processed. 1. Remove irq timer handler which is used by outdated IC. 2. Skip irq close request send from HAL. For now, HAL open and close irq in very high freq, and at last, irq will be set to open state. When HW report IRQ, but HAL set irq state to close. This will cause missing IRQ issue. Change-Id: I5448ef89cfe988197d4204b17e4764b730ec1ad4 Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1407246 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yan Zhang Reviewed-by: Weilong Wu Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/input/misc/ets_fps_mmi/ets_fps.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.c b/drivers/input/misc/ets_fps_mmi/ets_fps.c index c5be30271c7d..7ce4e8f39427 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.c +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.c @@ -229,10 +229,10 @@ void interrupt_timer_routine(unsigned long _data) static irqreturn_t fp_eint_func(int irq, void *dev_id) { - if (!fps_ints.int_count) - mod_timer(&fps_ints.timer, jiffies + msecs_to_jiffies(fps_ints.detect_period)); - fps_ints.int_count++; - /* printk_ratelimited(KERN_WARNING "----------- zq fp fp_eint_func ,fps_ints.int_count=%d",fps_ints.int_count);*/ + + fps_ints.finger_on = 1; + wake_up_interruptible(&interrupt_waitq); + DEBUG_PRINT("etspi: %s int trigger\n", __func__); #ifdef CONFIG_HAS_WAKELOCK wake_lock_timeout(&ets_wake_lock, msecs_to_jiffies(1500)); #else @@ -400,12 +400,13 @@ struct poll_table_struct *wait) { unsigned int mask = 0; - /* DEBUG_PRINT("%s %d\n", __func__, fps_ints.finger_on);*/ - /* fps_ints.int_count = 0; */ - poll_wait(file, &interrupt_waitq, wait); if (fps_ints.finger_on) { mask |= POLLIN | POLLRDNORM; - /* fps_ints.finger_on = 0; */ + } else { + poll_wait(file, &interrupt_waitq, wait); + if (fps_ints.finger_on) { + mask |= POLLIN | POLLRDNORM; + } } return mask; } @@ -492,9 +493,7 @@ static long etspi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) etspi_reset(etspi); goto done; case INT_TRIGGER_CLOSE: - DEBUG_PRINT("etspi:fp_ioctl <<< fp Trigger function close\n"); - retval = Interrupt_Free(etspi); - DEBUG_PRINT("etspi:fp_ioctl trigger close = %x\n", retval); + pr_info("etspi: skip interrupt close request from HAL."); goto done; case INT_TRIGGER_ABORT: DEBUG_PRINT("etspi:fp_ioctl <<< fp Trigger function abort\n");