summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Peng <robinpeng@google.com>2022-06-06 18:58:35 +0800
committerRobin Peng <robinpeng@google.com>2022-06-06 18:58:35 +0800
commit55a5962e31ff96603251a0720d16ae3c574ec255 (patch)
treed7a305d3c9f28031bfaddcf8aa5f09454436de7b
parent0ba8264e89b3e605164eef3e511042435e357fe0 (diff)
parent4e3b65e345091dba53b31dd15d63b7234b245b93 (diff)
downloadfocaltech_touch-55a5962e31ff96603251a0720d16ae3c574ec255.tar.gz
Merge android13-gs-pixel-5.10-tm-d1 into android13-gs-pixel-5.10-tm-qpr1
Bug: 233569354 Signed-off-by: Robin Peng <robinpeng@google.com> Change-Id: I0d781acc39f1fa54c0aa38a319ca03c654eb4197
-rw-r--r--ft3658/focaltech_core.c10
-rw-r--r--ft3658/focaltech_test/focaltech_test.c57
2 files changed, 8 insertions, 59 deletions
diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c
index 6da73d1..21b3d6a 100644
--- a/ft3658/focaltech_core.c
+++ b/ft3658/focaltech_core.c
@@ -2968,16 +2968,18 @@ static int fts_ts_remove_entry(struct fts_ts_data *ts_data)
fts_point_report_check_exit(ts_data);
#endif
fts_release_apk_debug_channel(ts_data);
+
+#if FTS_TEST_EN
+ /* remove the test nodes and sub-dir in /proc/focaltech_touch/selftest/ */
+ fts_test_exit(ts_data);
+#endif
+ /* remove all nodes and sub-dir in /proc/focaltech_touch/ */
fts_remove_sysfs(ts_data);
fts_ex_mode_exit(ts_data);
fts_fwupg_exit(ts_data);
-#if FTS_TEST_EN
- fts_test_exit(ts_data);
-#endif
-
#if FTS_ESDCHECK_EN
fts_esdcheck_exit(ts_data);
#endif
diff --git a/ft3658/focaltech_test/focaltech_test.c b/ft3658/focaltech_test/focaltech_test.c
index 182b185..5e64919 100644
--- a/ft3658/focaltech_test/focaltech_test.c
+++ b/ft3658/focaltech_test/focaltech_test.c
@@ -3648,7 +3648,7 @@ static int fts_create_test_procs(struct fts_ts_data *ts_data)
proc_test_baseline = proc_create_data("Baseline", S_IRUSR,
fts_proc_test_dir, &proc_test_baseline_fops, ts_data);
- if (!proc_test_raw) {
+ if (!proc_test_baseline) {
FTS_ERROR("create proc_test_baseline entry fail");
return -ENOMEM;
}
@@ -3662,7 +3662,7 @@ static int fts_create_test_procs(struct fts_ts_data *ts_data)
proc_test_uniformity = proc_create_data("Rawdata_Uniformity", S_IRUSR,
fts_proc_test_dir, &proc_test_uniformity_fops, ts_data);
- if (!proc_test_raw) {
+ if (!proc_test_uniformity) {
FTS_ERROR("create proc_test_uniformity entry fail");
return -ENOMEM;
}
@@ -3706,58 +3706,6 @@ static int fts_create_test_procs(struct fts_ts_data *ts_data)
return ret;
}
-static void fts_free_test_procs(void)
-{
- FTS_TEST_FUNC_ENTER();
-
- if (proc_run_os_test)
- proc_remove(proc_run_os_test);
-
- if (proc_test_fwver)
- proc_remove(proc_test_fwver);
-
- if (proc_test_chnum)
- proc_remove(proc_test_chnum);
-
- if (proc_test_reset_pin)
- proc_remove(proc_test_reset_pin);
-
- if (proc_test_sw_reset)
- proc_remove(proc_test_sw_reset);
-
- if (proc_test_int_pin)
- proc_remove(proc_test_int_pin);
-
- if (proc_test_raw)
- proc_remove(proc_test_raw);
-
- if (proc_test_baseline)
- proc_remove(proc_test_baseline);
-
- if (proc_test_uniformity)
- proc_remove(proc_test_uniformity);
-
- if (proc_test_sraw)
- proc_remove(proc_test_sraw);
-
- if (proc_test_scb)
- proc_remove(proc_test_scb);
-
- if (proc_test_noise)
- proc_remove(proc_test_noise);
-
- if (proc_test_short)
- proc_remove(proc_test_short);
-
- if (proc_test_panel_differ)
- proc_remove(proc_test_panel_differ);
-
- if (proc_test_strength)
- proc_remove(proc_test_strength);
-
- FTS_TEST_FUNC_EXIT();
-}
-
int fts_test_init(struct fts_ts_data *ts_data)
{
int ret = 0;
@@ -3799,7 +3747,6 @@ int fts_test_exit(struct fts_ts_data *ts_data)
{
FTS_TEST_FUNC_ENTER();
- fts_free_test_procs();
if (fts_proc_test_dir)
proc_remove(fts_proc_test_dir);
sysfs_remove_group(&ts_data->dev->kobj, &fts_test_attribute_group);