From efbe0ec3fadaf056a4c0ba2fc9eb28a6899cebfc Mon Sep 17 00:00:00 2001 From: haojl2 Date: Sat, 12 Oct 2019 19:43:51 +0800 Subject: [PATCH] focaltech_0flash_mmi: Disable irq is gesture not enabled TP: If tp gesture is not enabled, disable touch irq when suspend, and enable it in resume Change-Id: I1a0973206e0bcd81c3dd020538c357b7913ad142 Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1436140 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang Reviewed-by: Jun Weng Submit-Approved: Jira Key --- .../input/touchscreen/focaltech_0flash_mmi/focaltech_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c index b086a65384ea..83a5c6e10710 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_core.c @@ -2070,7 +2070,7 @@ static int _fts_ts_suspend(struct device *dev) #endif #endif - + fts_irq_disable(); /* TP enter sleep mode */ ret = fts_write_reg(FTS_REG_POWER_MODE, FTS_REG_POWER_MODE_SLEEP_VALUE); if (ret < 0) @@ -2144,6 +2144,7 @@ static int _fts_ts_resume(struct device *dev) fts_reset_proc(200); } + fts_irq_enable(); fts_tp_state_recovery(ts_data); #if FTS_ESDCHECK_EN