From: Soeren Sonnenburg <kernel@nn7.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thomas Rohwer <tr@tng.de>,
linux-input@atrey.karlin.mff.cuni.cz,
Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: Problem with appletouch driver in Linux version 2.6.23-rc7
Date: Thu, 27 Sep 2007 17:51:41 +0000 [thread overview]
Message-ID: <1190915501.7636.4.camel@localhost> (raw)
In-Reply-To: <d120d5000709261313j16f9612fx7d445b707df7784b@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
On Wed, 2007-09-26 at 16:13 -0400, Dmitry Torokhov wrote:
> On 9/26/07, Soeren Sonnenburg <kernel@nn7.de> wrote:
> >
> > On Mon, 2007-09-24 at 15:22 +0200, Thomas Rohwer wrote:
> > > Hello,
> > >
> > > > could you please re-send the patch? I for some reason have yet to see
> > > > it ...
> > >
> > > here it is again, adressing also the comments from Dmitry.
> >
> > Thomas, Matthew and Dmitry,
> >
> > I think there is another bug in this. I mean whenever a mouse button is
> > pressed or the mouse is moved the counter should be reset - no?
> >
> > Currently the idle counter is just increased...
> >
> > I mean shouldn't it be
> >
> > if (x || y || key)
> > dev->idlecount=0;
> >
> > if (!x && !y && !key)
> > {
> > dev->idlecount++;
> > if (dev->idlecount == 10) {
> > dev->valid = 0;
> > schedule_work(&dev->work);
> > }
> > }
> >
>
> Yes, I think you are right. I guess one could trigger an extra reset
> by pressing the button repeatedly witout touching the pad. But because
> we won't do reset while the button is pressed we'll never lose release
> event.
>
> I guess we want to fix it but it can wait for 2.6.24. A patch woudl be
> appreciated.
Patch is attached. As all these if () conditions made it quite
unreadable I moved the block dealing with geyser 3 and above to the very
bottom. Still compiles/works for me. Please have a look.
Soeren
[-- Attachment #2: appletouch.diff --]
[-- Type: text/x-patch, Size: 1187 bytes --]
Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index a1804bf..78f30b2 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb)
/* reset the accumulator on release */
memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
+ }
+
+ /* 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 */
- /* 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 (!key && atp_is_geyser_3(dev)) {
+ 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;
}
input_report_key(dev->input, BTN_LEFT, key);
next prev parent reply other threads:[~2007-09-27 17:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 17:14 Problem with appletouch driver in Linux version 2.6.23-rc7 Thomas Rohwer
2007-09-24 12:40 ` Dmitry Torokhov
2007-09-24 12:49 ` Matthew Garrett
2007-09-24 13:03 ` Soeren Sonnenburg
2007-09-24 13:22 ` Thomas Rohwer
2007-09-26 19:56 ` Soeren Sonnenburg
2007-09-26 20:13 ` Dmitry Torokhov
2007-09-27 17:51 ` Soeren Sonnenburg [this message]
2007-09-27 21:08 ` Thomas Rohwer
2007-10-13 21:33 ` Soeren Sonnenburg
2007-10-13 21:44 ` Matthew Garrett
2007-10-15 13:09 ` Dmitry Torokhov
2007-09-24 13:10 ` Thomas Rohwer
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=1190915501.7636.4.camel@localhost \
--to=kernel@nn7.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=mjg59@srcf.ucam.org \
--cc=tr@tng.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.