Apple Touchpad Driver (atp) Readme
----------------------------------
	Copyright (C) 2005 Stelian Pop <stelian@popies.net>

atp[1] is a Linux kernel driver for the USB touchpad found on post February 2005
Apple Alu Powerbooks.

This driver is derived from Johannes Berg's appletrackpad driver[2], but it has been
improved in some areas:
	* atp is a full kernel driver, no userspace program is necessary
	* atp can be interfaced with the synaptics X11 driver, in order to have
	  touchpad acceleration, scrolling, etc.

Credits go to Johannes Berg for reverse-engineering the touchpad protocol and
to Alex Harper for some additional information about the inner workings of the
touchpad sensors.

Usage:
------

In order to use the touchpad in the basic mode, compile the driver and load
the module. A new input device will be detected and you will be able to read
the mouse data from /dev/input/mice (using gpm, or X11).

In X11, you can configure the touchpad to use the synaptics driver, which will
give additional functionalities, like acceleration, scrolling etc. In order to
do this, make sure you're using a recent version of the synaptics driver (tested
with 0.14.2, you can download it from [3]), and configure a new input device in your
X11 configuration file (take a look at my /etc/X11/xorg.conf for an example: [4]).
For additional configuration, see the synaptics driver documentation files.

Fuzz problems:
--------------

The touchpad sensors are very sensitive to heat, and will generate a lot of
noise when the temperature changes. This is especially true when you power-on
the laptop for the first time.

The atp driver tries to handle this noise and auto adapt itself, but it is not
perfect.

If you need to manually reset the touchpad state, just put your palm on the
touchpad for one second.

Reset can be activated using the 'reset' module parameter. This parameter takes
a number corresponding to the number of samples the drivers will read from the
hardware before deciding it has reached a stable state:
	modprobe atp reset=10
		or
	echo "10" > /sys/module/atp/parameters/reset

You can activate debugging using the 'debug' module parameter. A value of 0
deactivates any debugging, 1 activates tracing of invalid samples, 2 activates
full tracing (each sample is being traced):
	modprobe atp debug=1
		or
	echo "1" > /sys/module/atp/parameters/debug

Synaptics re-detection problems:
--------------------------------

The synaptics driver tries to re-open the touchpad input device file
(/dev/input/eventX) each time you change from text mode back to X. If the
input device file does not exist at this precise moment, the synaptics driver
will give up searching for a touchpad, permanently. You will need to restart X
if you want to reissue a scan.

In normal circumstances, this is not a problem since the touchpad driver is loaded
before X starts, so all will go well.

But if you rmmod/insmod the atp driver (because you're hacking it), or if you need
to unload the usb modules before doing a suspend to disk (like I need to), you
will get into problems.

The solution I found is to modify udev configuration files in order to create a
specific device file for the touchpad (/dev/input/atp), and point the synaptics
driver to this fixed device file. See my udev.rules [5] and xorg.conf [6] excerpts.

Links:
------

[1]: http://www.popies.net/atp/
[2]: http://johannes.sipsolutions.net/PowerBook/touchpad/
[3]: http://web.telia.com/~u89404340/touchpad/index.html
[4]: http://www.popies.net/atp/Documentation/xorg.conf
[5]: http://www.popies.net/atp/Documentation/udev.rules
[6]: http://www.popies.net/atp/Documentation/xorg-udev.conf
