From: Johannes Berg <johannes@sipsolutions.net>
To: Dmitry Torokhov <dtor@mail.ru>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Anton Ekblad <valderman@gmail.com>,
Sven Anders <anders@anduras.de>,
Soeren Sonnenburg <debianppc-ml@nn7.de>
Subject: [PATCH v2] appletouch: fix fountain touchpad breakage
Date: Wed, 24 Oct 2007 13:29:02 +0200 [thread overview]
Message-ID: <1193225342.4510.16.camel@johannes.berg> (raw)
In-Reply-To: <1193222676.4510.5.camel@johannes.berg>
The patch 46249ea60fbb61a72ee6929b831b1f3e6865f024 was obviously done
without testing on a fountain touchpad. It causes appletouch to
continuously printk:
drivers/input/mouse/appletouch.c: Could not do mode read request from device (Geyser 3 mode)
because the fountain touchpad doesn't respond to that. The patch description
also states:
> if we see 10 empty packets the touchpad needs to be reset; good
> touchpads should not send empty packets anyway.
which is *TOTALLY* bogus since fountain touchpads have no notion of
empty packets, the simply continuously send measurements. One look at
the specification would have confirmed that.
This reverts the clueless commit, a better solution for geyser 1
touchpads must be found.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
What I'd advocate for 2.6.25 is to split appletouch into two drivers:
"appletouch" for fountain touchpads and maybe "appletouch2" for geyser
touchpads, this will get rid of many of the huge if statements in the
packet processing path and make sure that the macbook crowd will no
longer have to workaround the powerbook touchpads seeing that we seem to
hardly talk to each other.
Or maybe Soeren Sonnenburg's rewrite could be used for Geyser touchpads.
drivers/input/mouse/appletouch.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
--- linux-2.6.orig/drivers/input/mouse/appletouch.c 2007-10-24 12:37:39.140210069 +0200
+++ linux-2.6/drivers/input/mouse/appletouch.c 2007-10-24 12:37:50.000215820 +0200
@@ -504,22 +504,25 @@ static void atp_complete(struct urb* urb
memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
}
- input_report_key(dev->input, BTN_LEFT, key);
- input_sync(dev->input);
-
- /* Many Geysers will continue to send packets continually after
+ /* Geyser 3 will continue to send packets continually after
the first touch unless reinitialised. Do so if it's been
idle for a while in order to avoid waking the kernel up
several hundred times a second */
- if (!x && !y && !key) {
- dev->idlecount++;
- if (dev->idlecount == 10) {
- dev->valid = 0;
- schedule_work(&dev->work);
+ if (atp_is_geyser_3(dev)) {
+ if (!x && !y && !key) {
+ dev->idlecount++;
+ if (dev->idlecount == 10) {
+ dev->valid = 0;
+ schedule_work(&dev->work);
+ }
}
- } else
- dev->idlecount = 0;
+ else
+ dev->idlecount = 0;
+ }
+
+ input_report_key(dev->input, BTN_LEFT, key);
+ input_sync(dev->input);
exit:
retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
next prev parent reply other threads:[~2007-10-24 13:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 10:44 [PATCH] fix appletouch geyser 1 breakage Johannes Berg
2007-10-24 11:22 ` Johannes Berg
2007-10-24 11:29 ` Johannes Berg [this message]
2007-10-24 12:55 ` Dmitry Torokhov
2007-10-24 13:05 ` Johannes Berg
2007-10-24 13:34 ` Dmitry Torokhov
2007-10-24 13:36 ` Johannes Berg
2007-10-24 14:29 ` Dmitry Torokhov
2007-10-25 13:23 ` Johannes Berg
2007-10-25 18:28 ` Benjamin Berg
2007-10-26 16:05 ` Dmitry Torokhov
2007-10-26 20:31 ` Johannes Berg
2007-10-28 5:00 ` Dmitry Torokhov
2007-10-28 10:31 ` Johannes Berg
2007-10-28 14:54 ` Dmitry Torokhov
2007-10-28 15:08 ` Johannes Berg
2007-10-29 5:09 ` Dmitry Torokhov
2007-10-29 8:12 ` Johannes Berg
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=1193225342.4510.16.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=anders@anduras.de \
--cc=debianppc-ml@nn7.de \
--cc=dtor@mail.ru \
--cc=linuxppc-dev@ozlabs.org \
--cc=valderman@gmail.com \
/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).