Am Freitag, den 11.02.2005, 21:10 +0100 schrieb Vojtech Pavlik: > Hi! > > I've reimplemented the Lifebook touchscreen driver using libps2 and > input, to make it short and fitting into the kernel drivers. > > Please comment on code and test for functionality! > > PS.: The driver should register two input devices. It doesn't yet, > since that isn't very straightforward in the psmouse framework. First of all it's good to see lifebook-support integrated. I have tested your driver on my box but the initialization fails. Do you have hardware available for testing? As far as I can see the init-sequence is the one from Haralds xfree 3.3.6-driver. There is a reason why this sequence is not like that anymore in my driver. This sequence does not always work and there is not something like a "magic knock sequence". The lifebook-touchscreen hardware is a little bit slow and it happens quite often that it does not understand a command that you send. This is the reason why you often have to send a command several times until the hardware understands... Probably this was what was seen by Harald on the USB-bus and he just used this sequence. Second thing is that I am not shure that it is a good idea to integrate the lbtouch-support into the psmouse-driver since there is no real way of deciding if the device you are talking to is REALLY a lifebook-touchsreen or not. You have put the init-sequence for the hw into the lifebook_detect-function which is not correct since this not really a "detect" but a HW-init. IMHO the driver should be standalone and the user should decide which driver he wants to use. As default the touchscreen-functionality will be disabled and only the quick-point device will work like a normal PS2-mouse. I also don't think that it is useful to have two devices for the touchscreen. I assume you want to have one device for relative movements and one for the absolute ones!? But for the implementor in userspace (X, SDL,...) it will be easier if ALL events from this HW-device come via one device-node. I attached the current version of my driver here so people can also have a look at it. I didn't release this version on my homepage yet and the only difference between the released version an this one is that the y-axis is swapped. I did this since all input devices seem to have a common idea of where y=0 is and my driver was the only one where y was just the other way round. One more thing I observed by inspecting your code is that your untouch-event will never happen. I think my driver works and is clean enough for integration into the kernel. We can talk about integrating calls to libps2 instead of doing the stuff myself (I am a big fan of preventing code-duplication) but don't you think it would be more wise to use a driver which works (since the very early 2.6-days) and build upon that instead of trying to implement your own one from the scratch and using snippets from very old and obsolete code? And as far as I can see you don't even have access to the hardware!?!? Greetings Kenan