From f0597e7a291f5ba4bf7ecfd5d9b07bd288d83da9 Mon Sep 17 00:00:00 2001 From: litong Date: Wed, 13 May 2020 19:20:27 +0800 Subject: [PATCH] Report finger lift events after touch suspend. Solve the problem that the events between the release of the finger and the completion of the suspend is not released. Change-Id: I1ccaa71ecd48b91c99f33a9655408dbf8cd1ce09 Reviewed-on: https://gerrit.mot.com/1553366 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jialei Hao Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.c | 1 + drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.h | 1 + .../input/touchscreen/synaptics_tcm_mmi_v2/synaptics_touch.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.c b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.c index 321a14c9dc6c..d1799d19cd3b 100644 --- a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.c +++ b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.c @@ -3420,6 +3420,7 @@ int syna_tcm_suspend(struct device *dev) if (!tcm_hcd->wakeup_gesture_enabled) tcm_hcd->enable_irq(tcm_hcd, false, true); + touch_free_objects(); tcm_hcd->in_suspend = true; return 0; diff --git a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.h b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.h index b351db97b9ba..47a66da60d90 100644 --- a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.h +++ b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_core.h @@ -598,6 +598,7 @@ int touch_reinit(struct syna_tcm_hcd *tcm_hcd); int touch_early_suspend(struct syna_tcm_hcd *tcm_hcd); int touch_suspend(struct syna_tcm_hcd *tcm_hcd); int touch_resume(struct syna_tcm_hcd *tcm_hcd); +void touch_free_objects(void); int syna_tcm_resume(struct device *dev); int syna_tcm_suspend(struct device *dev); diff --git a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_touch.c b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_touch.c index 4829fa9326ed..55e4f641b509 100644 --- a/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_touch.c +++ b/drivers/input/touchscreen/synaptics_tcm_mmi_v2/synaptics_touch.c @@ -162,7 +162,7 @@ static struct touch_hcd *touch_hcd; * * Report finger lift events to the input subsystem for all touch objects. */ -static void touch_free_objects(void) +void touch_free_objects(void) { #ifdef TYPE_B_PROTOCOL unsigned int idx;