[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinso7BZB4GxgsQshaGeka+CcjUtjB9Agdj3qFnz@mail.gmail.com>
Date: Sat, 18 Dec 2010 11:05:08 -0600
From: Chris Bagwell <chris@...bagwell.com>
To: Henrik Rydberg <rydberg@...omail.se>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jiri Kosina <jkosina@...e.cz>,
Chase Douglas <chase.douglas@...onical.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] Input: synaptics - ignore bogus mt packet
On Sat, Dec 18, 2010 at 8:52 AM, Henrik Rydberg <rydberg@...omail.se> wrote:
> In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes
> sends a final main packet with x == 1. Since the normal values are above
> 1472, this is clearly bogus. At the same time, a two-finger touch is
> signaled, even though only one finger was on the pad to begin with. This
> patch ignores the packet altogether, removing the problem.
I've seen this behavior as well although I thought it always came when
hw.z == 0 so was masked. I guess its not to surprising its sneaking
threw with low pressures.
>
> Signed-off-by: Henrik Rydberg <rydberg@...omail.se>
> ---
> drivers/input/mouse/synaptics.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 8a769e9..4744064 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -526,7 +526,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
> return;
> }
>
> - if (hw.z > 0) {
> + if (hw.z > 0 && hw.x > 1) {
> num_fingers = 1;
> finger_width = 5;
> if (SYN_CAP_EXTENDED(priv->capabilities)) {
> @@ -558,7 +558,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
> if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
> if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
>
> - if (hw.z > 0) {
> + if (hw.z > 0 && hw.x > 1) {
> input_report_abs(dev, ABS_X, hw.x);
> input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
> }
This might read better if we change to "if (num_fingers) {" and then
we do not need to repeat the hw work around logic twice.
Also, this snippet shows I may be seeing it as well but the
BTN_TOUCH=0 when < 25 is probably masking it for most cases.
Either way:
Acked-by: Chris Bagwell <chris@...bagwell.com>
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists