From 8113c08da6e9bcfc1ff13a6b28d77bade139346a Mon Sep 17 00:00:00 2001 From: litong Date: Wed, 24 Mar 2021 09:44:28 +0800 Subject: [PATCH] Remove pressure events TP: If we support ABS_MT_PRESSURE event, when we keep touching the screen during the boot process, it will cause the touch to be unresponsive after booting, and all input events will be treated as HOVER events in framwrok. Change-Id: I75d33a691bba5729b066df3b80fb1681ce97b5c9 Reviewed-on: https://gerrit.mot.com/1908277 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/input/touchscreen/stmicro_mmi/fts.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/stmicro_mmi/fts.c b/drivers/input/touchscreen/stmicro_mmi/fts.c index de5b837fce38..f3e865982e88 100644 --- a/drivers/input/touchscreen/stmicro_mmi/fts.c +++ b/drivers/input/touchscreen/stmicro_mmi/fts.c @@ -2161,10 +2161,11 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned input_report_abs(info->input_dev, ABS_MT_POSITION_Y, y); input_report_abs(info->input_dev, ABS_MT_TOUCH_MAJOR, z); input_report_abs(info->input_dev, ABS_MT_TOUCH_MINOR, z); -#if KERNEL_VERSION(5, 4, 0) < LINUX_VERSION_CODE + /* input_report_abs(info->input_dev, ABS_MT_PRESSURE, z); input_report_abs(info->input_dev, ABS_MT_DISTANCE, distance); -#endif + */ + /* logError(0, "%s %s : Event 0x%02x - ID[%d], (x, y) = (%3d, %3d) * Size = %d\n", tag, __func__, *event, touchId, x, y, touchType); */ @@ -4210,12 +4211,12 @@ static int fts_probe(struct spi_device *client) AREA_MAX, 0, 0); input_set_abs_params(info->input_dev, ABS_MT_TOUCH_MINOR, AREA_MIN, AREA_MAX, 0, 0); -#if KERNEL_VERSION(5, 4, 0) < LINUX_VERSION_CODE + /* input_set_abs_params(info->input_dev, ABS_MT_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, 0, 0); input_set_abs_params(info->input_dev, ABS_MT_DISTANCE, DISTANCE_MIN, DISTANCE_MAX, 0, 0); -#endif + */ #ifdef GESTURE_MODE input_set_capability(info->input_dev, EV_KEY, KEY_WAKEUP);