Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265612AbTFRX2X (ORCPT ); Wed, 18 Jun 2003 19:28:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265613AbTFRX2W (ORCPT ); Wed, 18 Jun 2003 19:28:22 -0400 Received: from maild.telia.com ([194.22.190.101]:29945 "EHLO maild.telia.com") by vger.kernel.org with ESMTP id S265612AbTFRX2J (ORCPT ); Wed, 18 Jun 2003 19:28:09 -0400 X-Original-Recipient: linux-kernel@vger.kernel.org To: Vojtech Pavlik Cc: Kernel Mailing List , Joseph Fannin , Jens Taprogge Subject: Re: [PATCH] Synaptics TouchPad driver for 2.5.70 References: <20030615001905.A27084@ucw.cz> <20030615142838.A3291@ucw.cz> <20030615192731.A6972@ucw.cz> From: Peter Osterlund Date: 19 Jun 2003 01:41:31 +0200 In-Reply-To: <20030615192731.A6972@ucw.cz> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3324 Lines: 72 Vojtech Pavlik writes: > On Sun, Jun 15, 2003 at 05:47:57PM +0200, Peter Osterlund wrote: > > > > The X driver already relies on EV_SYN to decide when it should act on > > the data from the kernel. The problem is that the packet stream is > > used as a time base for gesture decoding, because the touchpad was > > designed like that to make driver implementation simpler. > > We may switch to using some ABS_ or BNT_TOOL_ values for the gesture > reporting if some other than Synaptics pad is reporting those, so that > we can have one common driver. That other pad may not only not be > sending data in a different format, but most likely will also not be > sending the data one second after last real event. ... > Well, I'd suggest using the timestamp on the packets and not just > counting them, but the decision is yours, of course. The timestamp is > very exact. I have modified the X driver now, so that it doesn't depend on packets arriving one second after the last event, and so that it uses wall clock time instead of counting packets. This version therefore works with an unpatched 2.5.72 kernel. It is available here: http://w1.894.telia.com/~u89404340/touchpad/index.html I think the following patch should be applied anyway. It adds a link to the html page, fixes bogus reset retry logic and fixes a deviation from the coding style preferred by Linus. diff -u -r linux/drivers/input/mouse.orig/Kconfig linux/drivers/input/mouse/Kconfig --- linux/drivers/input/mouse.orig/Kconfig 2003-06-19 01:30:39.000000000 +0200 +++ linux/drivers/input/mouse/Kconfig 2003-06-17 22:03:17.000000000 +0200 @@ -37,7 +37,7 @@ This touchpad is found on many modern laptop computers. Note that you also need a user space driver to interpret the data generated by the kernel. A compatible driver for XFree86 is available - from http://... + from http://w1.894.telia.com/~u89404340/touchpad/index.html If unsure, say Y. diff -u -r linux/drivers/input/mouse.orig/synaptics.c linux/drivers/input/mouse/synaptics.c --- linux/drivers/input/mouse.orig/synaptics.c 2003-06-19 01:30:47.000000000 +0200 +++ linux/drivers/input/mouse/synaptics.c 2003-06-17 22:06:48.000000000 +0200 @@ -171,9 +171,9 @@ static int query_hardware(struct psmouse *psmouse) { struct synaptics_data *priv = psmouse->private; - int retries = 3; + int retries = 0; - while ((retries++ <= 3) && synaptics_reset(psmouse)) + while ((retries++ < 3) && synaptics_reset(psmouse)) printk(KERN_ERR "synaptics reset failed\n"); if (synaptics_identify(psmouse, &priv->identity)) @@ -266,8 +266,7 @@ * Functions to interpret the absolute mode packets ****************************************************************************/ -static void synaptics_parse_hw_state(struct synaptics_data *priv, - struct synaptics_hw_state *hw) +static void synaptics_parse_hw_state(struct synaptics_data *priv, struct synaptics_hw_state *hw) { unsigned char *buf = priv->proto_buf; -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/