(CR):[Kane]:[kernel][factory](1/1)Fix selftest process in 1st himax vendor.
authorhq_qiaoquanbin_tmp <qiaoquanbin@huaqin.com>
Tue, 15 Jan 2019 09:40:19 +0000 (17:40 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:36:54 +0000 (17:36 +0800)
Fix selftest process in 1st himax vendor.

bug:(CR)

Change-Id: I71da11e670a9eb6afc34fcaceccdbbc817d14a7b
Signed-off-by: hq_qiaoquanbin_tmp <qiaoquanbin@huaqin.com>
drivers/input/touchscreen/hxchipset/himax_common.c

index 210eab3fb5f44aad21d93df3928f1b26bef9ac90..9dc9a6d5da478a7b1df211ac45c693c6aca04c9f 100755 (executable)
@@ -248,6 +248,16 @@ static ssize_t himax_self_test_read(struct file *file, char *buf,
        char *temp_buf;
        I("%s: enter, %d \n", __func__, __LINE__);
 
+       if (private_ts->suspended) {
+               E("[%s][%d]:The TP current status is suspend, please don't selftest!\n", __func__, __LINE__);
+               return ret;
+       }
+
+       if (private_ts->in_self_test == 1) {
+               E("[%s][%d]:The TP selftest is doing test, please don't selftest again!\n", __func__, __LINE__);
+               return ret;
+       }
+
        if (!HX_PROC_SEND_FLAG) {
                temp_buf = kzalloc(len, GFP_KERNEL);
                himax_int_enable(0);/* disable irq */