From: Oskari Saarenmaa <os@ohmu.fi>
To: Chase Douglas <chase.douglas@canonical.com>
Cc: Tai-hwa Liang <avatar@sentelic.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org
Subject: [PATCHv2] Input: sentelic - filter taps in absolute mode
Date: Tue, 3 Apr 2012 09:59:09 +0300 [thread overview]
Message-ID: <20120403065909.GA32166@timantti.taisia.fi> (raw)
In-Reply-To: <4F79D54E.4060500@canonical.com>
Taps in absolute positioning single-finger mode are currently reported
as physical clicks by the driver. This should be handled by userspace,
not the kernel.
When a tap occurs, the FSP_PB0_LBTN bit is set, but the FSP_PB0_PHY_BTN
is not. We use this to filter out physical clicks from taps.
Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Reviewed-by: Tai-hwa Liang <avatar@sentelic.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
---
Added missing braces around the bitwise or operation, reworded the
commit message and added reviewed-by and cc lines.
drivers/input/mouse/sentelic.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index a977bfa..d4df8cd 100644
--- a/drivers/input/mouse/sentelic.c
+++ b/drivers/input/mouse/sentelic.c
@@ -741,6 +741,14 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
}
} else {
/* SFAC packet */
+ if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) ==
+ FSP_PB0_LBTN) {
+ /* On-pad click in SFAC mode should be handled
+ * by userspace. On-pad clicks in MFMC mode
+ * are real clickpad clicks, and not ignored.
+ */
+ packet[0] &= ~FSP_PB0_LBTN;
+ }
/* no multi-finger information */
ad->last_mt_fgr = 0;
--
1.7.7.6
next prev parent reply other threads:[~2012-04-03 6:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 18:30 [PATCH] Input: sentelic - filter on-pad clicks in absolute mode Oskari Saarenmaa
2012-04-02 14:22 ` Chase Douglas
2012-04-02 14:57 ` Oskari Saarenmaa
2012-04-02 15:05 ` Chase Douglas
2012-04-02 15:37 ` Oskari Saarenmaa
2012-04-02 16:04 ` Dmitry Torokhov
2012-04-02 16:06 ` Tai-hwa Liang
2012-04-02 16:35 ` Chase Douglas
2012-04-03 6:59 ` Oskari Saarenmaa [this message]
2012-04-03 16:46 ` [PATCHv2] Input: sentelic - filter taps " 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=20120403065909.GA32166@timantti.taisia.fi \
--to=os@ohmu.fi \
--cc=avatar@sentelic.com \
--cc=chase.douglas@canonical.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.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).