diff options
author | Wendly Li <wendlyli@google.com> | 2023-02-24 09:50:19 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2023-03-09 09:13:56 +0000 |
commit | 43c3130d20f6553cd581c5489046f435de09d7c4 (patch) | |
tree | 7d7bc5784c481d503bda19b66e07c0012e675c22 /goodix_ts_core.c | |
parent | f1f49bd734cb33ed7aea62d6c71fd0e6274bbda4 (diff) | |
download | goodix_touch-43c3130d20f6553cd581c5489046f435de09d7c4.tar.gz |
touch/goodix: Support coordinate filter
Bug: 269560367
Test: Check coordinate filter works properly
Change-Id: I2fbf972d1d67f3c28b090a9db1569e52e407c384
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_ts_core.c')
-rw-r--r-- | goodix_ts_core.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/goodix_ts_core.c b/goodix_ts_core.c index 036200d..5afdf01 100644 --- a/goodix_ts_core.c +++ b/goodix_ts_core.c @@ -1109,6 +1109,25 @@ static int get_screen_protector_mode( return 0; } +static int set_coord_filter_enabled(void *private_data, + struct gti_coord_filter_cmd *cmd) +{ + struct goodix_ts_core *cd = private_data; + return cd->hw_ops->set_coord_filter_enabled(cd, + cmd->setting == GTI_COORD_FILTER_ENABLE); +} + +static int get_coord_filter_enabled(void *private_data, + struct gti_coord_filter_cmd *cmd) +{ + struct goodix_ts_core *cd = private_data; + bool enabled = false; + + cd->hw_ops->get_coord_filter_enabled(cd, &enabled); + cmd->setting = enabled ? GTI_COORD_FILTER_ENABLE : GTI_COORD_FILTER_DISABLE; + return 0; +} + static int set_heatmap_enabled( void *private_data, struct gti_heatmap_cmd *cmd) { @@ -2899,6 +2918,8 @@ int goodix_ts_stage2_init(struct goodix_ts_core *cd) options->get_palm_mode = get_palm_mode; options->set_screen_protector_mode = set_screen_protector_mode; options->get_screen_protector_mode = get_screen_protector_mode; + options->set_coord_filter_enabled = set_coord_filter_enabled; + options->get_coord_filter_enabled = get_coord_filter_enabled; options->set_heatmap_enabled = set_heatmap_enabled; options->get_fw_version = gti_get_fw_version; options->set_irq_mode = gti_set_irq_mode; |