summaryrefslogtreecommitdiff
path: root/goodix_brl_hw.c
diff options
context:
space:
mode:
authorWendly Li <wendlyli@google.com>2022-03-01 19:40:37 +0000
committerWendly Li <wendlyli@google.com>2022-03-28 03:37:03 +0000
commit8e96b34084994ee6a085b7be916886ddcbe547b5 (patch)
tree4909adf10715b4c718a5ae6077349d3b24d07d8f /goodix_brl_hw.c
parent9d66e88a3704ee82c67c617ec6e7c9cef2403dca (diff)
downloadgoodix_touch-8e96b34084994ee6a085b7be916886ddcbe547b5.tar.gz
Add motion filter mode
Bug: 214118990 Test: Check mf_mode works properly Change-Id: I4dca2a71a396e7cff1cd5b7cc4d728a15312b8a9 Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r--goodix_brl_hw.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c
index fd62579..2ec735d 100644
--- a/goodix_brl_hw.c
+++ b/goodix_brl_hw.c
@@ -1438,6 +1438,20 @@ int brl_set_scan_mode(struct goodix_ts_core *cd, int mode)
return 0;
}
+#define GOODIX_CMD_SET_CONTINUOUSLY_REPORT_ENABLED 0xC3
+int brl_set_continuously_report_enabled(struct goodix_ts_core *cd, bool enabled)
+{
+ struct goodix_ts_cmd cmd;
+
+ cmd.cmd = GOODIX_CMD_SET_CONTINUOUSLY_REPORT_ENABLED;
+ cmd.len = 5;
+ cmd.data[0] = enabled ? 0 : 1;
+ if (cd->hw_ops->send_cmd(cd, &cmd))
+ ts_err("failed set continuous mode cmd");
+
+ return 0;
+}
+
static struct goodix_ts_hw_ops brl_hw_ops = {
.power_on = brl_power_on,
.resume = brl_resume,
@@ -1458,6 +1472,7 @@ static struct goodix_ts_hw_ops brl_hw_ops = {
.get_capacitance_data = brl_get_capacitance_data,
.ping = brl_dev_confirm,
.set_scan_mode = brl_set_scan_mode,
+ .set_continuously_report_enabled = brl_set_continuously_report_enabled,
};
struct goodix_ts_hw_ops *goodix_get_hw_ops(void)