Yick Lam wrote: > > Hi, > > I am developing a driver for the touchpad designed by our team of > engineer. The hardware is originally a com port device and it works > perfectly. Now the hardware is changed to USB and the driver I > devloped is changed to a character device. > > With the com port, somewhere in the driver, I have: > local->fd = xf86OpenSerial(local->option); > > and when there is a data from serial port, the function > xf86ReadInput(...) will be called. > > However, since now I the driver I developed is a character > device, instead of xf86OpenSerial, I use: > local->fd = xf86open(priv->devfilename, ORDWR|O_NDELAY, 0) > and I am expecting the function xf86ReadInput will be called > when there is data avaible. But this does not work. > > Questions: > 1) Why I get no message from when use xf86open > 2) Has anyone written a driver the reads input from pipe > in Linux so that I can test the protocol with my own > input? > > Yick > Hong Kong, China
Input is a bit tricky because it has to go through a SIGIO handler that knows about your input device. I don't remember the details, but the USB handler in the Wacom driver should be a useful example for Linux-only USB. We really need to get USB support at the server level, because most new devices will be USB. As for FIFO support, I have also thought about that as a useful debug/test tool. Socket support would be good where two-way communication is needed, and could be used to connect simulated devices, or even connected over a network to a remote device. But, I don't know of anyone implementing either of these. Another useful tool I've thought about is an input module loader that can run/debug input drivers without loading a whole server. Joe Krahn _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
