From ef0a86e7a76e5d1dd4010a3c41bc214b08448bb8 Mon Sep 17 00:00:00 2001 From: hq_qiaoquanbin_tmp Date: Tue, 15 Jan 2019 17:40:19 +0800 Subject: [PATCH] (CR):[Kane]:[kernel][factory](1/1)Fix selftest process in 1st himax vendor. Fix selftest process in 1st himax vendor. bug:(CR) Change-Id: I71da11e670a9eb6afc34fcaceccdbbc817d14a7b Signed-off-by: hq_qiaoquanbin_tmp --- drivers/input/touchscreen/hxchipset/himax_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/touchscreen/hxchipset/himax_common.c b/drivers/input/touchscreen/hxchipset/himax_common.c index 210eab3fb5f4..9dc9a6d5da47 100755 --- a/drivers/input/touchscreen/hxchipset/himax_common.c +++ b/drivers/input/touchscreen/hxchipset/himax_common.c @@ -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 */ -- 2.20.1