diff options
author | Super Liu <supercjliu@google.com> | 2023-04-06 05:19:59 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2023-04-06 08:02:42 +0000 |
commit | 2ac4885ede24a3da9a142f4a04eeda368476a871 (patch) | |
tree | 52b005588bdcb56ebb35f36f815a4b984ed223b8 | |
parent | 8da5744724d93c45251f91a2f09c5420de8da65c (diff) | |
download | goodix_touch-2ac4885ede24a3da9a142f4a04eeda368476a871.tar.gz |
Revert^2 "touch/goodix: Support custom limits file name"
f7c506cc918825a37eb6a856e7dd31e7b283efdc
Change-Id: I37f998ee31f63eb77b76298c8fd41f9bc9422b70
-rw-r--r-- | goodix_ts_core.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/goodix_ts_core.c b/goodix_ts_core.c index 2380555..e37f54f 100644 --- a/goodix_ts_core.c +++ b/goodix_ts_core.c @@ -1344,10 +1344,20 @@ static int goodix_parse_dt( } } - /* use default test limits name */ - ts_info("use default test limits: %s", TS_DEFAULT_TEST_LIMITS); - strncpy(board_data->test_limits_name, TS_DEFAULT_TEST_LIMITS, - sizeof(board_data->test_limits_name)); + /* get test limits file name */ + r = of_property_read_string( + node, "goodix,test-limits-name", &name_tmp); + if (!r) { + ts_info("test limits name from dt: %s", name_tmp); + strncpy(board_data->test_limits_name, name_tmp, + sizeof(board_data->test_limits_name)); + } else { + /* use default test limits name */ + ts_info("can't find test limits name, use default: %s\n", + TS_DEFAULT_TEST_LIMITS); + strncpy(board_data->test_limits_name, TS_DEFAULT_TEST_LIMITS, + sizeof(board_data->test_limits_name)); + } } /* get xyz resolutions */ |