From f15105e96ee6a44b4433832b93a26310d8fdfde4 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Mon, 11 Apr 2022 12:55:06 +0800 Subject: synaptics: set dynamic motion filter as default. Bug: 199104356 Test: Touch works normally. Signed-off-by: davidycchen Change-Id: I943708f5c1adab3e20fe7f26f15ec54f5d0df668 --- syna_tcm2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'syna_tcm2.c') diff --git a/syna_tcm2.c b/syna_tcm2.c index 30eb9c2..5c19330 100644 --- a/syna_tcm2.c +++ b/syna_tcm2.c @@ -311,12 +311,12 @@ static int syna_update_motion_filter(struct syna_tcm *tcm, u8 touches) const u32 mf_timeout_ms = 500; u8 next_state; - if (tcm->mf_mode == 0) { + if (tcm->mf_mode == MF_OFF) { if (touches != 0) next_state = MF_UNFILTERED; else next_state = MF_FILTERED; - } else if (tcm->mf_mode == 1) { + } else if (tcm->mf_mode == MF_DYNAMIC) { /* Determine the next filter state. The motion filter is enabled by * default and it is disabled while a single finger is touching the * screen. If another finger is touched down or if a timeout expires, @@ -347,11 +347,11 @@ static int syna_update_motion_filter(struct syna_tcm *tcm, u8 touches) } break; } - } else if (tcm->mf_mode == 2) { + } else if (tcm->mf_mode == MF_ON) { next_state = MF_FILTERED; } else { - /* Set 0 as default when an invalid value is found. */ - tcm->mf_mode = 0; + /* Set 1(Dynamic) as default when an invalid value is found. */ + tcm->mf_mode = MF_DYNAMIC; return 0; } @@ -2776,7 +2776,7 @@ static int syna_dev_probe(struct platform_device *pdev) #endif /* init motion filter mode */ - tcm->mf_mode = 0; + tcm->mf_mode = MF_DYNAMIC; INIT_WORK(&tcm->motion_filter_work, syna_motion_filter_work); -- cgit v1.2.3