From 813f45a8e22f2fd5e0195e38dc79f2fd3c5c2013 Mon Sep 17 00:00:00 2001 From: chenl18 Date: Thu, 4 Apr 2019 10:25:24 +0800 Subject: [PATCH] [Kane]FPS:Add wake lock when transfer data to TA Fingerprint transfer data is interrupted by system suspend, so CA can't get response from TA. Then system server watchdog happen. To avoid the system sleep, add wake lock when transfer data from CA to TA. Change-Id: I627c04d63b324b1c6e7283e455efe2e78cf67319 Signed-off-by: chenl18 Reviewed-on: https://gerrit.mot.com/1332303 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/input/egistec/et320-int.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/egistec/et320-int.c b/drivers/input/egistec/et320-int.c index 818a64fb5490..350b40d19824 100755 --- a/drivers/input/egistec/et320-int.c +++ b/drivers/input/egistec/et320-int.c @@ -51,6 +51,8 @@ #define FP_SPICLK_ENABLE 0xaa #define FP_SPICLK_DISABLE 0xab +#define FP_ENABLE_WAKELOCK 0xb1 +#define FP_DISABLE_WAKELOCK 0xb2 #define EDGE_TRIGGER_FALLING 0x0 #define EDGE_TRIGGER_RAISING 0x1 @@ -574,6 +576,12 @@ static long etspi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) DEBUG_PRINT("etspi:fp_ioctl spi_clk_enable = %x\n", data.clk_enable); spi_clk_enable(etspi, data.clk_enable); goto done; + case FP_ENABLE_WAKELOCK: + wake_lock_timeout(&et320_wake_lock, msecs_to_jiffies(1500)); + goto done; + case FP_DISABLE_WAKELOCK: + wake_unlock(&et320_wake_lock); + goto done; default: retval = -ENOTTY; break; -- 2.20.1