From de5cdbcffde875f1b7ea9cc3ad391375fa8803c3 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Mon, 8 Aug 2022 14:25:28 +0800 Subject: synaptics: set the firmware grip/palm mode with a workqueue When there is a command triggered from a workqueue is still pending, a new command is sent from the interrupt handler causes the touch IC returns a pending error code. Move the setting commands in the interrupt handler to workqueue to avoid the above issue. Bug: 239181810 Test: Keep toggling the settings and scrolling the screen. watch -n2 "adb shell stop twoshay; sleep 1; adb shell start twoshay" Signed-off-by: davidycchen Change-Id: Idb5a39147da56c2f3942280f6567ae696e3f1449 --- syna_tcm2.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'syna_tcm2.h') diff --git a/syna_tcm2.h b/syna_tcm2.h index a9c11cc..0aaee81 100644 --- a/syna_tcm2.h +++ b/syna_tcm2.h @@ -494,6 +494,11 @@ struct syna_tcm { /* Work for motion filter commands. */ struct work_struct motion_filter_work; + /* Work for setting firmware grip mode. */ + struct work_struct set_grip_mode_work; + /* Work for setting firmware palm mode. */ + struct work_struct set_palm_mode_work; + /* IOCTL-related variables */ pid_t proc_pid; struct task_struct *proc_task; @@ -522,6 +527,8 @@ struct syna_tcm { bool high_sensitivity_mode; u8 enable_fw_grip; u8 enable_fw_palm; + u8 next_enable_fw_grip; + u8 next_enable_fw_palm; #if defined(USE_DRM_BRIDGE) struct drm_bridge panel_bridge; -- cgit v1.2.3