* Re: psmouse: synaptics (2.6.0-test1|2) @ 2003-07-28 16:08 Andries.Brouwer 2003-07-28 18:51 ` David Benfell 2003-07-28 22:13 ` Nico Schottelius 0 siblings, 2 replies; 7+ messages in thread From: Andries.Brouwer @ 2003-07-28 16:08 UTC (permalink / raw) To: nico-kernel; +Cc: linux-kernel > My touchpad stops working with 2.5.74. You mean it worked in 2.5.73 but not in 2.5.74? > howto get gpm running? Ask the gpm maintainer. > what source of information do you use? Vendor docs. User reports. Yes, reports from you. Andries ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: psmouse: synaptics (2.6.0-test1|2) 2003-07-28 16:08 psmouse: synaptics (2.6.0-test1|2) Andries.Brouwer @ 2003-07-28 18:51 ` David Benfell 2003-07-28 22:13 ` Nico Schottelius 1 sibling, 0 replies; 7+ messages in thread From: David Benfell @ 2003-07-28 18:51 UTC (permalink / raw) To: linux-kernel [-- Attachment #1: Type: text/plain, Size: 760 bytes --] On Mon, 28 Jul 2003 18:08:50 +0200, Andries.Brouwer@cwi.nl wrote: > > > My touchpad stops working with 2.5.74. > > You mean it worked in 2.5.73 but not in 2.5.74? > > > howto get gpm running? > > Ask the gpm maintainer. > > > what source of information do you use? > > Vendor docs. User reports. Yes, reports from you. > Can't help with GPM, but Peter Osterlund and I have gotten his driver working under Linux 2.6. This really is a win because now the vertical scroll pad works -- it never did under my old configuration. Event device support is important. Some other things are really not helpful. My updated notes are available at: http://www.greybeard95a.com/hp/zt1180/ -- David Benfell benfell@parts-unknown.org [-- Attachment #2: Type: application/pgp-signature, Size: 478 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: psmouse: synaptics (2.6.0-test1|2) 2003-07-28 16:08 psmouse: synaptics (2.6.0-test1|2) Andries.Brouwer 2003-07-28 18:51 ` David Benfell @ 2003-07-28 22:13 ` Nico Schottelius 1 sibling, 0 replies; 7+ messages in thread From: Nico Schottelius @ 2003-07-28 22:13 UTC (permalink / raw) To: Andries.Brouwer; +Cc: nico-kernel, linux-kernel Andries.Brouwer@cwi.nl [Mon, Jul 28, 2003 at 06:08:50PM +0200]: > > My touchpad stops working with 2.5.74. > > You mean it worked in 2.5.73 but not in 2.5.74? more correct it was 2.5.72. > > howto get gpm running? > > Ask the gpm maintainer. *wonder* 'how do i get gpm running?' (look at linux.schottelius.org/gpm/) the problem is I currently recieve _no_ data from psaux. no init response. nothing. > > what source of information do you use? > > Vendor docs. User reports. Yes, reports from you. and you try / want to implement whole gpm in the kernel? (without the bugs we have....) Nico -- echo God bless America | sed 's/.*\(A.*$\)/Why \1?/' pgp: new id: 0x8D0E27A4 | ftp.schottelius.org/pub/familiy/nico/pgp-key.new ^ permalink raw reply [flat|nested] 7+ messages in thread
* psmouse: synaptics (2.6.0-test1|2) @ 2003-07-28 8:18 Nico Schottelius 2003-07-28 19:13 ` Peter Osterlund 0 siblings, 1 reply; 7+ messages in thread From: Nico Schottelius @ 2003-07-28 8:18 UTC (permalink / raw) To: Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 682 bytes --] Hello! My touchpad stops working with 2.5.74. With 2.6.0test2 I got minimal success: If I attach an external ps2mouse while booting, I can use this one. Until I remove it, soon the kernel (psmouse I think) tries to init the touchpad which fails. My questions: 1) why are you implementing drivers in the kernel? 2) what source of information do you use to program them? 3) how can I read /dev/misc/psaux in Linux 2.6 ? 3.1) howto get gpm running? 3.2) is the patch mentioned for X implemented in X cvs? Nico -- echo God bless America | sed 's/.*\(A.*$\)/Why \1?/' pgp: new id: 0x8D0E27A4 | ftp.schottelius.org/pub/familiy/nico/pgp-key.new [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: psmouse: synaptics (2.6.0-test1|2) 2003-07-28 8:18 Nico Schottelius @ 2003-07-28 19:13 ` Peter Osterlund 2003-07-28 22:22 ` Nico Schottelius 0 siblings, 1 reply; 7+ messages in thread From: Peter Osterlund @ 2003-07-28 19:13 UTC (permalink / raw) To: Nico Schottelius; +Cc: Linux Kernel Mailing List Nico Schottelius <nico-kernel@schottelius.org> writes: > My questions: > 3) how can I read /dev/misc/psaux in Linux 2.6 ? AFAIK, you can't. > 1) why are you implementing drivers in the kernel? Because the raw psaux device is no longer exposed to user space. > 2) what source of information do you use to program them? The synaptics touchpad interfacing guide. I think this link is still valid: http://www.synaptics.com/decaf/utilities/ACF126.pdf > 3.1) howto get gpm running? You have to hack gpm to add support for the 2.6 kernel driver. Until someone fixes gpm you have to use the "psmouse_noext=1" module option. > 3.2) is the patch mentioned for X implemented in X cvs? No, not currently. Aside from technical considerations, there is also a license problem, because the synaptics driver is GPL:ed, which is not compatible (I think) with the license used by XFree86. This means that all copyright holders for the synaptics driver need to agree to change the license, or their contributions have to be removed and reimplemented. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: psmouse: synaptics (2.6.0-test1|2) 2003-07-28 19:13 ` Peter Osterlund @ 2003-07-28 22:22 ` Nico Schottelius 2003-07-29 10:59 ` Peter Osterlund 0 siblings, 1 reply; 7+ messages in thread From: Nico Schottelius @ 2003-07-28 22:22 UTC (permalink / raw) To: Peter Osterlund; +Cc: Linux Kernel Mailing List, GPM Mailing List Peter Osterlund [Mon, Jul 28, 2003 at 09:13:49PM +0200]: > Nico Schottelius <nico-kernel@schottelius.org> writes: > > My questions: > > 3) how can I read /dev/misc/psaux in Linux 2.6 ? > > AFAIK, you can't. that could be a problem.. > > 1) why are you implementing drivers in the kernel? > > Because the raw psaux device is no longer exposed to user space. means we _are_ obsoleted from now on... if that's true I'll try to help you to use code from gpm where possible. and I hope we can work together so we can use gpm once again. (and possibly develop a buffer, which is available within gpm and X...I am rethinking this currently) > > 2) what source of information do you use to program them? > > The synaptics touchpad interfacing guide. I think this link is still valid: > > http://www.synaptics.com/decaf/utilities/ACF126.pdf think so, too. but in fact as my dmesg shows, the touchpad doesn't like you..and I would like to use it :) So, is /dev/input/mice now the general device to use? If yes, is it imps2 or what should we talk to it? > > 3.1) howto get gpm running? > > You have to hack gpm to add support for the 2.6 kernel driver. ...another brick in the .. another hack in gpm. > Until > someone fixes gpm you have to use the "psmouse_noext=1" module option. good hint, at least somehow I can work with X & gpm.. > > > 3.2) is the patch mentioned for X implemented in X cvs? > > No, not currently. Aside from technical considerations, there is also > a license problem, because the synaptics driver is GPL:ed, which is > not compatible (I think) with the license used by XFree86. Btw, aren't there any 'real' alternatives to xfree86? > This means > that all copyright holders for the synaptics driver need to agree to > change the license, or their contributions have to be removed and > reimplemented. ...or xfree86 people have to change to gpl... good evenin' Nico -- echo God bless America | sed 's/.*\(A.*$\)/Why \1?/' pgp: new id: 0x8D0E27A4 | ftp.schottelius.org/pub/familiy/nico/pgp-key.new ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: psmouse: synaptics (2.6.0-test1|2) 2003-07-28 22:22 ` Nico Schottelius @ 2003-07-29 10:59 ` Peter Osterlund 0 siblings, 0 replies; 7+ messages in thread From: Peter Osterlund @ 2003-07-29 10:59 UTC (permalink / raw) To: Nico Schottelius Cc: Vojtech Pavlik, Linux Kernel Mailing List, GPM Mailing List [-- Attachment #1: Type: text/plain, Size: 3845 bytes --] Nico Schottelius <nico-kernel@schottelius.org> writes: > Peter Osterlund [Mon, Jul 28, 2003 at 09:13:49PM +0200]: > > Nico Schottelius <nico-kernel@schottelius.org> writes: > > > My questions: > > > 3) how can I read /dev/misc/psaux in Linux 2.6 ? > > > > AFAIK, you can't. > > that could be a problem.. > > > > 1) why are you implementing drivers in the kernel? > > > > Because the raw psaux device is no longer exposed to user space. > > means we _are_ obsoleted from now on... > if that's true I'll try to help you to use code from gpm where possible. > and I hope we can work together so we can use gpm once again. > (and possibly develop a buffer, which is available within > gpm and X...I am rethinking this currently) No, gpm is not obsoleted. The kernel driver is supposed to export enough data in the /dev/input/eventX interface. It's then up to user space programs such as gpm or the XFree driver to do something useful with this data. One bonus is that the eventX device can be opened by multiple readers, so conflicts between gpm and the X driver should not happen any more. No nead to create any additional shared buffers. Note that I didn't design this event infrastructure. I just started to work on the synaptics kernel driver when I realized the XFree driver didn't work with the 2.5.x kernel. > > > 2) what source of information do you use to program them? > > > > The synaptics touchpad interfacing guide. I think this link is still valid: > > > > http://www.synaptics.com/decaf/utilities/ACF126.pdf > > think so, too. but in fact as my dmesg shows, the touchpad doesn't > like you..and I would like to use it :) What does dmesg say? > So, is /dev/input/mice now the general device to use? > If yes, is it imps2 or what should we talk to it? You should now use /dev/input/eventX, for some X. The XFree driver has code to autodetect the correct X which you can probably reuse for gpm. http://w1.894.telia.com/~u89404340/touchpad/index.html >From the event device, you read data looking like this: struct input_event { struct timeval time; __u16 type; __u16 code; __s32 value; }; The synaptics kernel driver currently reports the following events: ABS_X ABS_Y X, Y coordinates for the finger. ABS_PRESSURE Z value MSC_GESTURE W value (emulated if the touchpad doesn't support w) BTN_LEFT BTN_RIGHT Left/right buttons BTN_FORWARD BTN_BACK Up/down buttons, if present. BTN_0, ..., BTN_7 Multi buttons, if present. Note that the kernel driver only reports changes, so you can no longer rely on the fact that the touchpad keeps sending data 1s after you stop using it. Pass through port devices (pointing sticks for example) get their own eventX device (at least with the extra kernel patches from the web page above), but they also report to the /dev/input/mice device, so I think they will just work without extra gpm support. (I don't have the hardware to test this though.) If this data is insufficient for the gpm driver, now would be a good time to extend/change it, before the stuff gets too widely used. Some points that have been raised before: * The W value ought to be split in "number of fingers" and "finger width". That would make the protocol general enough to be used for other touchpad models too, such as ALPS. * The Y value is reported in raw form. Should probably be mirrored depending on how the touchpad is oriented. I have also attached a simple test program I created to read from the event device. Maybe you find it useful for some initial tests. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 [-- Attachment #2: evdev.C --] [-- Type: text/plain, Size: 2749 bytes --] #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #define EVDEV "/dev/input/event0" // From linux/include/linux/input.h struct input_event { struct timeval time; unsigned short type; unsigned short code; unsigned int value; }; static inline double doubleTime(const timeval& tv) { return tv.tv_sec + tv.tv_usec / 1000000.0; } static const char* typeStr(int evType) { static char buf[16]; switch (evType) { case 0x00: return "RST"; case 0x01: return "KEY"; case 0x02: return "REL"; case 0x03: return "ABS"; case 0x04: return "MSC"; case 0x11: return "LED"; case 0x12: return "SND"; case 0x14: return "REP"; case 0x15: return "FF "; default: sprintf(buf, "%02x ", evType); return buf; } } static const char* keyStr(int key) { static char buf[16]; switch (key) { case 0x110: return "BTN_LEFT "; case 0x111: return "BTN_RIGHT "; case 0x112: return "BTN_MIDDLE "; case 0x113: return "BTN_SIDE "; case 0x114: return "BTN_EXTRA "; case 0x115: return "BTN_FORWARD"; case 0x116: return "BTN_BACK "; default: sprintf(buf, "%4x", key); return buf; } } static const char* relStr(int code) { static char buf[16]; switch (code) { case 0x00: return "X "; case 0x01: return "Y "; case 0x02: return "Z "; case 0x06: return "HWHEEL"; case 0x07: return "DIAL "; case 0x08: return "WHEEL "; case 0x09: return "MISC "; default: sprintf(buf, "%4x", code); return buf; } } static const char* absStr(int code) { static char buf[16]; switch (code) { case 0x00: return "ABS_X "; case 0x01: return "ABS_Y "; case 0x18: return "ABS_PRESSURE"; case 0x28: return "ABS_MISC "; default: sprintf(buf, "%4x", code); return buf; } } static const char* codeStr(int evType, int code) { static char buf[16]; switch (evType) { case 0x01: // KEY return keyStr(code); case 0x02: // REL return relStr(code); case 0x03: return absStr(code); // ABS default: sprintf(buf, "%4x", code); return buf; } } int main(int argc, char* argv[]) { const char* devName = EVDEV; if (argc > 1) devName = argv[1]; FILE* f = fopen(devName, "r"); if (!f) { fprintf(stderr, "Can't open file %s, errno:%d (%s)\n", devName, errno, strerror(errno)); exit(1); } input_event ev; double t0 = 0; while (fread(&ev, sizeof(input_event), 1, f) == 1) { if (t0 == 0) t0 = doubleTime(ev.time); double t = doubleTime(ev.time) - t0; printf("%10f %s %s %4d\n", t, typeStr(ev.type), codeStr(ev.type, ev.code), ev.value); } fclose(f); return 0; } ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-07-29 11:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-07-28 16:08 psmouse: synaptics (2.6.0-test1|2) Andries.Brouwer 2003-07-28 18:51 ` David Benfell 2003-07-28 22:13 ` Nico Schottelius -- strict thread matches above, loose matches on Subject: below -- 2003-07-28 8:18 Nico Schottelius 2003-07-28 19:13 ` Peter Osterlund 2003-07-28 22:22 ` Nico Schottelius 2003-07-29 10:59 ` Peter Osterlund
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).