diff options
author | Robert Buchholz <rbu@gentoo.org> | 2008-02-08 21:49:01 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2008-02-08 21:49:01 +0000 |
commit | f35e0a081e032244c74515a4757637d525dc3176 (patch) | |
tree | da545addcf927e5fdd5c68086500a2aa69aa5a3a /x11-drivers/linuxwacom/files | |
parent | added missing unzip dep (diff) | |
download | gentoo-2-f35e0a081e032244c74515a4757637d525dc3176.tar.gz gentoo-2-f35e0a081e032244c74515a4757637d525dc3176.tar.bz2 gentoo-2-f35e0a081e032244c74515a4757637d525dc3176.zip |
Install "check_driver" to support multiple input devices via udev (bug 209263). Enable compilation for <gcc-4 folks (bug #205139).
(Portage version: 2.1.3.19)
Diffstat (limited to 'x11-drivers/linuxwacom/files')
-rw-r--r-- | x11-drivers/linuxwacom/files/check_driver | 24 | ||||
-rw-r--r-- | x11-drivers/linuxwacom/files/check_driver.1 | 22 |
2 files changed, 46 insertions, 0 deletions
diff --git a/x11-drivers/linuxwacom/files/check_driver b/x11-drivers/linuxwacom/files/check_driver new file mode 100644 index 000000000000..6e49aa1f1691 --- /dev/null +++ b/x11-drivers/linuxwacom/files/check_driver @@ -0,0 +1,24 @@ +#!/bin/sh +# + +#logger check_driver called with: $1 - $2 - $3 - + +wanted=$1 +devpath=$2 +bustype=$3 + +device=$(readlink /sys/$devpath/device) +device=${device##*/} +driver=$(readlink /sys/$devpath/device/driver) +driver=${driver##*/} + +logger device $device is bound to the $driver driver + +if [ "$driver" != "$wanted" ]; then + logger must rebind + echo -n "$device" > /sys/$devpath/device/driver/unbind + echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind +else + logger no need to rebind +fi + diff --git a/x11-drivers/linuxwacom/files/check_driver.1 b/x11-drivers/linuxwacom/files/check_driver.1 new file mode 100644 index 000000000000..cf3a5f9e43e2 --- /dev/null +++ b/x11-drivers/linuxwacom/files/check_driver.1 @@ -0,0 +1,22 @@ +.TH wacom\-tools 1 "5 Nov 2004" "Debian GNU/Linux" "Debian" +.SH NAME +check_driver \- Linux 2.6(.16+) userspace device rebinding helper. + +.SH SYNOPSIS +.B check_driver driver devpath bustype + +.SH DESCRIPTION +This is a \fBRUN\fP script that may be invoked from a udev rule to ensure the +correct driver is bound to a particular device, in situations where a +basic driver may bind to it first but a more specialised one is available. + +.SH EXAMPLE +For the wacom device, a rule like this is used: + +KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}" + +.SH COPYRIGHT +2006, Ron Lee <ron@debian.org>. Created for the Debian GNU/Linux +distribution. It may be freely distributed elsewhere. + + |