diff options
author | Wendly Li <wendlyli@google.com> | 2022-08-12 03:54:16 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2022-08-15 05:32:23 +0000 |
commit | 455bcd18a27f5abcf19be0061b601900946c9f61 (patch) | |
tree | 71e2f58456ab35dceddae3f7a9333e697f6fd6fc /goodix_ts_proc.c | |
parent | a0d41eae06d6e3593b713e855d36a86210e307ba (diff) | |
download | goodix_touch-455bcd18a27f5abcf19be0061b601900946c9f61.tar.gz |
touch/goodix: Support MS, SS and selftest for gti
Bug: 214118904
Test: Check dumpstate works properly
Change-Id: I8a94def8811b2ea34b80e47affac8b50b615eecc
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_ts_proc.c')
-rw-r--r-- | goodix_ts_proc.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/goodix_ts_proc.c b/goodix_ts_proc.c index b605eb2..fff016f 100644 --- a/goodix_ts_proc.c +++ b/goodix_ts_proc.c @@ -3339,6 +3339,38 @@ static const struct file_operations cmd_list_ops = { }; #endif +int driver_test_selftest(char* buf) +{ + int ret = 0; + + release_test_resource(); + index = 0; + if (rbuf != NULL) { + kfree(rbuf); + rbuf = NULL; + } + + raw_data_cnt = 16; + noise_data_cnt = 1; + rbuf = kzalloc(SHORT_SIZE, GFP_KERNEL); + ret = malloc_test_resource(); + if (ret < 0) { + ts_err("malloc test resource failed"); + goto exit; + } + ts_test->item[GTP_CAP_TEST] = true; + ts_test->item[GTP_NOISE_TEST] = true; + ts_test->item[GTP_DELTA_TEST] = true; + ts_test->item[GTP_SELFCAP_TEST] = true; + ts_test->item[GTP_SHORT_TEST] = true; + goodix_auto_test(true); + + strlcpy(buf, rbuf, PAGE_SIZE); + +exit: + return ret; +} + int driver_test_proc_init(struct goodix_ts_core *core_data) { struct proc_dir_entry *proc_entry; |