1 |
pva 10/11/03 10:46:29 |
2 |
|
3 |
Added: check_driver.1 linuxwacom-module-2.6.36.patch |
4 |
check_driver |
5 |
Log: |
6 |
Inital import. Work based on linuxwacom package that was removed from the tree, bug #335821, thank Julien Sanchez for help. |
7 |
|
8 |
(Portage version: 2.1.9.24/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-kernel/linuxwacom-module/files/check_driver.1 |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/check_driver.1?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/check_driver.1?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: check_driver.1 |
17 |
=================================================================== |
18 |
.TH wacom\-tools 1 "5 Nov 2004" "Debian GNU/Linux" "Debian" |
19 |
.SH NAME |
20 |
check_driver \- Linux 2.6(.16+) userspace device rebinding helper. |
21 |
|
22 |
.SH SYNOPSIS |
23 |
.B check_driver driver devpath bustype |
24 |
|
25 |
.SH DESCRIPTION |
26 |
This is a \fBRUN\fP script that may be invoked from a udev rule to ensure the |
27 |
correct driver is bound to a particular device, in situations where a |
28 |
basic driver may bind to it first but a more specialised one is available. |
29 |
|
30 |
.SH EXAMPLE |
31 |
For the wacom device, a rule like this is used: |
32 |
|
33 |
KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}" |
34 |
|
35 |
.SH COPYRIGHT |
36 |
2006, Ron Lee <ron@××××××.org>. Created for the Debian GNU/Linux |
37 |
distribution. It may be freely distributed elsewhere. |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/linuxwacom-module-2.6.36.patch?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: linuxwacom-module-2.6.36.patch |
49 |
=================================================================== |
50 |
=== modified file 'src/2.6.30/wacom_wac.c' |
51 |
--- src/2.6.30/wacom_wac.c 2010-10-29 07:30:39 +0000 |
52 |
+++ src/2.6.30/wacom_wac.c 2010-10-29 07:31:29 +0000 |
53 |
@@ -202,10 +202,10 @@ |
54 |
y = get_unaligned_be16(&data[5 + (idx * 9)]) & 0x7ff; |
55 |
|
56 |
if (wacom->last_finger != finger) { |
57 |
- if (x == input->abs[ABS_X]) |
58 |
+ if (x == input->absinfo[ABS_X].value) |
59 |
x++; |
60 |
|
61 |
- if (y == input->abs[ABS_Y]) |
62 |
+ if (y == input->absinfo[ABS_X].value) |
63 |
y++; |
64 |
} |
65 |
|
66 |
@@ -843,10 +843,10 @@ |
67 |
int y = le16_to_cpup((__le16 *)&data[4 + finger * 2]) & 0x7fff; |
68 |
|
69 |
if (wacom->last_finger != finger) { |
70 |
- if (x == input->abs[ABS_X]) |
71 |
+ if (x == input->absinfo[ABS_X].value) |
72 |
x++; |
73 |
|
74 |
- if (y == input->abs[ABS_Y]) |
75 |
+ if (y == input->absinfo[ABS_X].value) |
76 |
y++; |
77 |
} |
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
1.1 sys-kernel/linuxwacom-module/files/check_driver |
84 |
|
85 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/check_driver?rev=1.1&view=markup |
86 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/linuxwacom-module/files/check_driver?rev=1.1&content-type=text/plain |
87 |
|
88 |
Index: check_driver |
89 |
=================================================================== |
90 |
#!/bin/sh |
91 |
# |
92 |
|
93 |
#logger check_driver called with: $1 - $2 - $3 - |
94 |
|
95 |
wanted=$1 |
96 |
devpath=$2 |
97 |
bustype=$3 |
98 |
|
99 |
device=$(readlink /sys/$devpath/device) |
100 |
device=${device##*/} |
101 |
driver=$(readlink /sys/$devpath/device/driver) |
102 |
driver=${driver##*/} |
103 |
|
104 |
logger device $device is bound to the $driver driver |
105 |
|
106 |
if [ "$driver" != "$wanted" ]; then |
107 |
logger must rebind |
108 |
echo -n "$device" > /sys/$devpath/device/driver/unbind |
109 |
echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind |
110 |
else |
111 |
logger no need to rebind |
112 |
fi |