diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-04-19 22:19:30 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-04-19 22:44:38 +0200 |
commit | b9273c2db7be946a3014b1f27bc6c67f3fe4621c (patch) | |
tree | c58ae00e5347eb58ab2803dfd182568d34665f82 | |
parent | 7906d516a3723b20a0590bb14da33d7f8d0e85ad (diff) | |
download | kernel_replicant_linux-b9273c2db7be946a3014b1f27bc6c67f3fe4621c.tar.gz kernel_replicant_linux-b9273c2db7be946a3014b1f27bc6c67f3fe4621c.tar.bz2 kernel_replicant_linux-b9273c2db7be946a3014b1f27bc6c67f3fe4621c.zip |
WIP: Input: mms114: don't report 0 pressure while slidingreplicant-10/touchscreen-sliding
When sliding we manage to have events that look like that:
Event: time 1571859641.595517, -------------- SYN_REPORT ------------
Event: time 1571859641.606593, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1193
Event: time 1571859641.606593, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 21
Event: time 1571859641.606593, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 0
Event: time 1571859641.606593, type 3 (EV_ABS), code 1 (ABS_Y), value 1193
Event: time 1571859641.606593, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1571859641.606593, -------------- SYN_REPORT ------------
However in Documentation/input/multi-touch-protocol.rst, we
have:
ABS_MT_PRESSURE
The pressure, in arbitrary units, on the contact
area. May be used instead of TOUCH and WIDTH for
pressure-based devices or any device with a spatial
signal intensity distribution.
Because of that userspace may use a ABS_MT_PRESSURE of 0 as
an indication that the sliding stopped.
However:
- The mms114 is present in several smartphones, which are sometimes
used with display protections. That may result in having an
ABS_MT_PRESSURE of 0 while sliding.
- Having an ABS_MT_PRESSURE of 0 is not consistent with
ABS_MT_TOUCH_MAJOR reported as > 0 along with a
ABS_MT_TRACKING_ID that is still valid.
- The touchscreen may be able to track fingers that are not
touching the display, if the display is touched and that
the finger is slightly lifterd over the display, however
the distance between the display and the finger would be
too small for valid use cases.
This was tested on the following devices:
- GT-I9300 with a glass screen protection
- GT-N7105 with a glass screen protection
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | drivers/input/touchscreen/mms114.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c index 69c6d559eeb0..267f7171d73a 100644 --- a/drivers/input/touchscreen/mms114.c +++ b/drivers/input/touchscreen/mms114.c @@ -183,7 +183,10 @@ static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *tou if (touch->pressed) { touchscreen_report_pos(input_dev, &data->props, x, y, true); input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, touch->width); - input_report_abs(input_dev, ABS_MT_PRESSURE, touch->strength); + if (touch->strength) { + input_report_abs(input_dev, ABS_MT_PRESSURE, + touch->strength); + } } } |