diff options
author | Peter Osterlund <petero2@telia.com> | 2003-07-31 02:16:20 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:01:07 +0200 |
commit | 67ae294551dcb8ac9d9bc4b4cb914c0e008c3db8 (patch) | |
tree | ba0cc42699c278fce574e4a44c38e8acc8d79bb4 | |
parent | 1d47626058ac32d07d08a73bdf1f6d3d19bf71c3 (diff) |
Disable stream mode before trying to identify/initialize the
touchpad. Otherwise the touchpad can report motion data in the middle
of the initialization sequence, which will confuse the driver and make
the initialization fail.
-rw-r--r-- | ps2comm.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -376,10 +376,24 @@ SynapticsEnableDevice(int fd) } Bool +SynapticsDisableDevice(int fd) +{ + xf86FlushInput(fd); + return ps2_putbyte(fd, PS2_CMD_DISABLE); +} + +Bool QueryIsSynaptics(int fd) { unsigned long id; + int i; + + for (i = 0; i < 3; i++) { + if (SynapticsDisableDevice(fd) == Success) + break; + } + xf86WaitForInput(fd, 20000); xf86FlushInput(fd); if(synaptics_identify(fd, &id) == Success) { return TRUE; |