diff options
author | Super Liu <supercjliu@google.com> | 2023-04-06 05:28:42 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2023-04-06 08:03:22 +0000 |
commit | dbe1400344600a5dc4b27792897f3c67293b246e (patch) | |
tree | ab58dc646373e6376ddc41865f94a7009d32dffe /goodix_ts_core.c | |
parent | b984c1dc70366f89ca9c1ee5ef187e119b8fd9ec (diff) | |
download | goodix_touch-dbe1400344600a5dc4b27792897f3c67293b246e.tar.gz |
Revert "Revert "touch/goodix: Support getting panel id from gti""
This reverts commit 15940f2fa8820708fe103da03d6110e4fa7141d7.
Reason for revert: Correct the mismatched heatmap position.
Change-Id: I31458180f5c1275f59537b2e976606f08fa18c71
Diffstat (limited to 'goodix_ts_core.c')
-rw-r--r-- | goodix_ts_core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/goodix_ts_core.c b/goodix_ts_core.c index 5da8560..d30da48 100644 --- a/goodix_ts_core.c +++ b/goodix_ts_core.c @@ -1269,6 +1269,9 @@ static int goodix_parse_dt( struct of_phandle_args panelmap; struct drm_panel *panel = NULL; const char *name; +#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) + int panel_id = -1; +#endif if (!board_data) { ts_err("invalid board data"); @@ -1348,7 +1351,17 @@ static int goodix_parse_dt( if (board_data->use_one_binary) ts_info("use one binary"); +#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) + panel_id = goog_get_panel_id(node); + if (panel_id >= 0) { + goog_get_firmware_name(node, panel_id, board_data->fw_name, sizeof(board_data->fw_name)); + if (!board_data->use_one_binary) + goog_get_config_name(node, panel_id, board_data->cfg_bin_name, sizeof(board_data->cfg_bin_name)); + goog_get_test_limits_name(node, panel_id, board_data->test_limits_name, sizeof(board_data->test_limits_name)); + } else if (of_property_read_bool(node, "goodix,panel_map")) { +#else if (of_property_read_bool(node, "goodix,panel_map")) { +#endif for (index = 0;; index++) { r = of_parse_phandle_with_fixed_args( node, "goodix,panel_map", 1, index, &panelmap); |