Synaptics cPad Linux driver for kernel 2.6
Latest: version 1.1
The cPad is an USB touchpad with background display (240x160 mono). If you
don't want to use the display, you do not need this driver. The cPad emulates
an USB mouse by default, so you can use the usbhid kernel module. But you
will be able to use
Synaptics TouchPad driver for XFree86
in combination with this kernel module, which will greatly improve mouse
movement. The Display can be accessed via a character device. A driver for kernel 2.4 is available at
Rob Miller's page.
The older versions of this kernel module included a frame buffer device, which is now split into a second kernel module and a user space program. The procfs interface is gone now, because it was mainly used to control the framebuffer. If you do not like this, you can get the older version here.
cPad and Debian
Ron Lee works on Debian packages for the cPad. The kernel modules are already available, user space programs maybe follow soon :-)
Problems with usbhid.ko
The conflict with usbhid.ko has been solved by Ron and me since version 0.9. At module initialisation, the cPad driver takes over the cPad from usbhid. If you hotplug a cPad, then you must maybe initiate another takeover manually with:
echo "1" > /sys/module/cpad/parameters/steal
Sometimes at startup the cPad reconnects. If this happens after module initialisation, you will have to initiate a takeover manually too.
If you have more than one cPad, you will need to patch the kernel (this kernel patch makes sure that usbhid will not handle the cPad any more).
Installation
The sources of your kernel must be installed and configured. In most cases the standard configuration of your kernel should already work (maybe you want to skip the next section first).
Configuring the kernel
At least, you need USB support in the kernel:
CONFIG_USB: y/m
Device Drivers --->
USB support --->
Support for Host-side USB
USB will only work, if you have the right driver(s) for your USB host controller. My Toshiba Laptop
needs both the EHCI and the OHCI driver. If unsure, just select all:
CONFIG_USB_EHCI_HCD and/or CONFIG_USB_OHCI_HCD and/or CONFIG_USB_UHCI_HCD: y/m
Device Drivers --->
USB support --->
EHCI HCD (USB 2.0) support
OHCI HCD support
UHCI HCD (most Intel and VIA) support
Synaptics TouchPad driver for XFree86
needs an evdev interface:
CONFIG_INPUT_EVDEV: y/m
Device Drivers --->
Input device support --->
Event interface
Installing the cpad kernel module
To compile the module, run:
make
To install the module, run:
make install
depmod -a
Synaptics TouchPad driver for XFree86
To enable features like tap-to-click, vertical/horizontal scrolling, multifinger
taps, etc you need
Synaptics TouchPad driver for XFree86
version >= 0.13.3 in addition to this kernel module. The example configuration for /etc/X11/XF86Config that comes with this driver should work fine. Don't forget to check if you have evdev compiled into the kernel or as a module, otherwise it will not work.
Programs for the cPad character device
If you want to flash the backlight and display nice pictures on the cPad, then
the program usr_cpad is the best choice. It is included in the tarball of the
kernel 2.4 driver, available at
Rob Miller's page.
There is also a gallery with examples, scripts ... Here is a slightly modified version of usr_cpad, which can send the images a bit faster.
Ron Lee has updated his cpad-mux debian packages. It is still work in progress, but a calculator already works!
With cpadfb you can put a frame buffer on the cPad.
The tool cpadconsole can help developing
programs for the character device.
cPad and udev
Udev
will replace devfs some day. Udev with its standard configuration creates the
cPad character device as /dev/cpad0, but it should be /dev/usb/cpad0.
If you already use udev, you may want to use these config files:
cpad.rules
cpadsymlinks.sh
Copy cpad.rules to /etc/udev/rules.d/ and cpadsymliks.sh to /etc/udev/scripts/.
cpadsymlinks.sh must be executable. This config files will also create a directory
/dev/cpad/0/ which contains symlinks to all devices that belong to the cpad.
Module parameters
Calibrate abs finger position
If you want to use the /dev/input/ts? (emulates Compaq Touchscreen protocol) device of the cPad, you maybe want to adjust the following values:
modprobe xmin=<value> xmax=<value> ymin=<value> ymax=<value>
The default values are:
xmin=1472
xmax=5472
ymin=1408
ymax=4448
Let usbhid handle the cpad
modprobe cpad steal=0
Bug
With kernel >= 2.6.7 rmmod hangs while the evdev device of the
cPad (/dev/input/event?) is in use. usbhid.ko seems to have the same
problem. If you are using Synaptics TouchPad driver for XFree86 and
do rmmod from xterm, it will hang. Switching to console and then back
to X helps. This was a bug in the input core, now fixed in kernel 2.6.10.
Changes
version 1.1:
fixed compilation errors for kernel versions < 2.6.10
version 1.0:
the driver has now only an input and a character device, and is based on usb_skeleton.c version 2.0
version 0.9-3:
Some changes in the way this driver gets the cPad from usbhid
version 0.9-2:
procfs broke in 0.9. Now it works again.
version 0.9:
Grab the cPad back from any driver that has already claimed it.
Leap ahead a couple of versions to sync with the 2.4 driver, so
people upgrading see a more or less monotonic increase in version
numbers (and because the Debian build of 0.5 already released with
DRIVER_VERSION of v0.8). Let's aim for v1.0 to be accepted into
the mainstream kernel tree.
version 0.6:
invert screen now possible in 1 bpp mode too
version 0.5:
Replaced deprecated MODULE_PARM and remap_page_range.
Merged with the 2.4 package as the cpad-0.8 release.
version 0.4:
replaced del_timer_sync with del_timer in interrupt context (bad bug)
version 0.3:
replaced interruptible_sleep_on_timeout with wait_event_interruptible_timeout
removed some inline's
show more information in procfs
add support for 1 bpp to frame buffer
add ioctl's to frame buffer
add oneframe, onlychanged and onlyvisible options to frame buffer
version 0.2:
fixed a color to mono conversion bug
added a pseudo_palette (needed by virtual terminals)
version 0.1: first release
E-Mail: jan.steinhoff@uni-jena.de