2010 - 2011 Ping Cheng, Wacom <pingc@wacom.com>

inputattach is to provide /dev/input/event, an USB-like logical port, for Wacom
serial ISDv4 digitizers on Linux. It requires wacom_w8001.ko being loaded in your
kernel and the following:

1.	inputattach.c
2.	serio-ids.h: a header file for inputattach.c to compile on different platforms.
3.	compile the code:  gcc inputattach.c -o inputattach

Procedures to test the driver and device:
1.	login to yourself and switch to root then issue:
	xxd /dev/ttyS0 and move Wacom pen on the tablet.
If you see data displays on the terminal where you launched xxd, this is the 
port the device is mapped to. If not, try ttyS1, 2,.... I see ttyS4 sometime. 
We assume it is on /dev/ttyS0 from now on.

2.	ls /dev/input and keep a note on how many "event"s you see. We need the 
largest number later.

3.	Connect your serial kernel driver to an input event by:
	./inputattach --wacom /dev/ttyS0  (if your device is at baud rate 19200)
or
	./inputattach --baud 38400 --wacom /dev/ttyS0  (if your device is at baud rate 38400)

4.	Check which port it is mapped to by:
	ls /dev/input
	
You should see a new /dev/input/event# added in the above output, that is the port 
your device is mapped to. If you have X server running and the latest Wacom X server
driver is installed, you should see cursor movement when you move the pen on the 
tablet now.

If you want to view the data directly from the port by evtest or some other kernel
programs, you need to disable Wacom X driver or launch the program from a console 
before X server starts. Otherwise, the Wacom X driver or some other X input device
drivcers, such as xf86-input-evdev, may grab the events before your program is launched.

In order to let Wacom X driver communicate with the wacom_w8001.ko kernel driver
instead of to the device directly, you need to install the newly built inputattach
to a path your env is aware of, such as /usr/bin or /usr/sbin. Then add

inputattach --wacom /dev/ttyS0 
(or inputattach --baud 38400 --wacom /dev/ttyS0, whichever applies)

to a system start script, such as /etc/rc.local, so the device will be mapped to a
/dev/input/event# before X driver starts.

