From owner-freebsd-hackers Fri Nov 29 23:53:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27E6437B401 for ; Fri, 29 Nov 2002 23:53:24 -0800 (PST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id E0A7543EA9 for ; Fri, 29 Nov 2002 23:53:22 -0800 (PST) (envelope-from mdcki@gmx.net) Received: (qmail 30938 invoked by uid 0); 30 Nov 2002 07:53:21 -0000 Received: from cvpn011.gwdg.de (HELO gmx.net) (134.76.22.11) by mail.gmx.net (mp019-rz3) with SMTP; 30 Nov 2002 07:53:21 -0000 Message-ID: <3DE87C91.70702@gmx.net> Date: Sat, 30 Nov 2002 09:53:37 +0100 From: Marcin Dalecki User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel O'Connor Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PS/2 Mice device - synaptics touch pad. References: <3DE794AD.6000908@gmx.net> <1038632298.39254.16.camel@chowder.dons.net.au> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel O'Connor wrote: > On Sat, 2002-11-30 at 02:54, Marcin Dalecki wrote: > >>Looking further I discovered that the writing method is filled with a >>global nowrite() function. >> >>What should I do about it: >> >>1. Just provide the trivial psmwrite() augmenting kernel level function, thus >>presering the higher level driver for XFree? >> >>2. Move everything in to the kernel space?! (The driver isn't exactly >>small due to many features like border detection and so on...) > > > I think number 1 is probably best, IMHO it should go into moused, but > given the way the moused code is written that is pretty tough :( OK. I'm going for nr 1. augmented with moused. This will have the advantage of making it globally abstracted on the system no matter whatever XFree86 or not. > Also if you follow step 1 you will have to provide some way of telling > the psm device not to validate the input stream, because otherwise it > will barf on the absolute packets. > (I have done a little tinkering, but the moused/psm code makes my head > explode) Yes the psm code is a bit rotten. But it's nothing in comparision to stuff I got used too under Linux ;-). I have looked at the 2 "other" BSE systems as well. OpenBSD has a bit of nice code separation and reordering but less functionality there. Where NetBSD did hide the PS/2 mice code I couldn't find out. Right now I have augmented the current psm.c with the device detection code for Synaptics touch pads: one sends a magic command sequence and gets a magic reply containing model info and stuff. Thus the tinkering in psm.c will certainly not affect any other PS/2 device type. psm0: current command byte:0045 HERE WE GO psm0: found Synaptics touch pad psm0: irq 12 on atkbdc0 psm0: model Synaptics touch pad, device ID 0-00, 2 buttons psm0: config:00000000, flags:00000000, packet size:3 psm0: syncmask:c0, syncbits:00 orm0: