From: Andrew Duggan <aduggan@synaptics.com>
To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Duggan <aduggan@synaptics.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Cameron Gutman <aicommander@gmail.com>,
Thorsten Leemhuis <linux@leemhuis.info>,
Christopher Heiny <cheiny@synaptics.com>,
Nick Dyer <nick@shmanahar.org>
Subject: [PATCH] Input: synaptics-rmi4 - Report slot as inactive when contact is a palm
Date: Thu, 16 Mar 2017 16:56:31 -0700 [thread overview]
Message-ID: <1489708591-4320-1-git-send-email-aduggan@synaptics.com> (raw)
When the firmware identifies a contact as a palm the driver sets the tool
type to MT_TOOL_PALM, but sets the slot state as active. Reporting the
palm as active results in userspace input libraries considering the palm
as a valid contact. Touchpads which previously were using hid-multitouch
are now not suppressing palms when switching to the RMI4 driver. This
change fixes palm rejection when using the RMI4 driver.
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Tested-by: Cameron Gutman <aicommander@gmail.com>
---
drivers/input/rmi4/rmi_2d_sensor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_2d_sensor.c b/drivers/input/rmi4/rmi_2d_sensor.c
index 8bb866c..8d1f295 100644
--- a/drivers/input/rmi4/rmi_2d_sensor.c
+++ b/drivers/input/rmi4/rmi_2d_sensor.c
@@ -80,7 +80,8 @@ void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor,
input_mt_slot(input, slot);
input_mt_report_slot_state(input, obj->mt_tool,
- obj->type != RMI_2D_OBJECT_NONE);
+ (obj->type != RMI_2D_OBJECT_NONE)
+ && (obj->type != RMI_2D_OBJECT_PALM));
if (obj->type != RMI_2D_OBJECT_NONE) {
obj->x = sensor->tracking_pos[slot].x;
--
2.7.4
next reply other threads:[~2017-03-16 23:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 23:56 Andrew Duggan [this message]
2017-03-17 0:04 ` [PATCH] Input: synaptics-rmi4 - Report slot as inactive when contact is a palm Dmitry Torokhov
2017-03-17 0:52 ` Andrew Duggan
2017-03-17 21:00 ` Dmitry Torokhov
2017-04-02 11:18 ` Thorsten Leemhuis
2017-03-20 5:02 ` Peter Hutterer
2017-03-17 0:58 ` Peter Hutterer
2017-03-17 20:49 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489708591-4320-1-git-send-email-aduggan@synaptics.com \
--to=aduggan@synaptics.com \
--cc=aicommander@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=cheiny@synaptics.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=nick@shmanahar.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).