Hi,
I have written a USB device driver for writing pad
as a character device. The name of the device is Penpower
and the driver node is /dev/penpower. When I
"cat /dev/penpower"
I saw some meaningful output when touch the screen.
However, the driver itself is useless. It must be able
to be used in X-Windows. So I have written a X-windows input
driver for this purpose. However, no matter how hard I try
it does not work. I got not response from the device when I touch
the screen. I posted a question in this mailing-list before and
I had a reponse from Joe Krahn saying that:
> 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.
Base on the above message and reading through the X windows
source code, and also hints from the following sites,
http://www.handhelds.org/projects/ts_spec.html
My conclusion is that the device driver should implement all the
following:
User Level File Operations:
-open(),
-close()
-ioctl()
-blocking and non-blocking read()
-asynchronous notification (SIGIO) should be supported
-select/poll mechanism
Kernel Level File Operations
_read(),
_fasync() SIGIO to user when there is an event to report.
I have not implemented asynchronous notification (SIGIO)
in my USB driver.
Questions:
1) Is my conclusion correct?
2) What is "asynchronous notification (SIGIO)"? I have never
heard of it in my life. Any Example around?
3) Does evdev.c supports asynchronous notification (SIGIO) in
/dev/input/event0. If not, why not?
Yick
Hong Kong Chian
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert