[Kane]FPS:Add wake lock when transfer data to TA
authorchenl18 <chenlei18@lenovo.com>
Thu, 4 Apr 2019 02:25:24 +0000 (10:25 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:56 +0000 (11:24 +0800)
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 <chenlei18@mt.com>
Reviewed-on: https://gerrit.mot.com/1332303
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/input/egistec/et320-int.c

index 818a64fb5490acf7a1f40430435ce7157744d32c..350b40d198249d67d1d682acc344570486848537 100755 (executable)
@@ -51,6 +51,8 @@
 \r
 #define FP_SPICLK_ENABLE                       0xaa\r
 #define FP_SPICLK_DISABLE                      0xab\r
+#define FP_ENABLE_WAKELOCK                     0xb1\r
+#define FP_DISABLE_WAKELOCK                    0xb2\r
 \r
 #define EDGE_TRIGGER_FALLING    0x0\r
 #define        EDGE_TRIGGER_RAISING    0x1\r
@@ -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);\r
                spi_clk_enable(etspi, data.clk_enable);\r
                goto done;\r
+       case FP_ENABLE_WAKELOCK:\r
+               wake_lock_timeout(&et320_wake_lock, msecs_to_jiffies(1500));\r
+               goto done;\r
+       case FP_DISABLE_WAKELOCK:\r
+               wake_unlock(&et320_wake_lock);\r
+               goto done;\r
        default:\r
        retval = -ENOTTY;\r
        break;\r