summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-07-11 17:57:14 +0200
committerChristoph Brill <egore911@egore911.de>2008-07-11 17:57:14 +0200
commit5dc6baf97c13f73e2640bd9d1bd452f5621129d1 (patch)
tree9387a7abaa835942c127ee4edc67cf7dff12b41c
parent68df5196bcbd161db395a354ec8ccdf4735670db (diff)
Unpleasant hack to make input hotplug DSCTTRT.
This also points out to the new "Path" option in the man page
-rw-r--r--man/synaptics.man2
-rw-r--r--src/synaptics.c32
2 files changed, 22 insertions, 12 deletions
diff --git a/man/synaptics.man b/man/synaptics.man
index 9b733f3..78cc791 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -9,7 +9,7 @@ synaptics \- Synaptics touchpad input driver
.BI " Identifier \*q" devname \*q
.B " Driver \*qsynaptics\*q"
.BI " Option \*qDevice\*q \*q" devpath \*q
-.BI " Option \*qProtocol\*q \*q" auto-dev \*q
+.BI " Option \*qPath\*q \*q" path \*q
\ \ ...
.B EndSection
.fi
diff --git a/src/synaptics.c b/src/synaptics.c
index aa46ead..93606ba 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -166,22 +166,32 @@ XF86ModuleData synapticsModuleData = {&VersionRec, &SetupProc, NULL };
static void
SetDeviceAndProtocol(LocalDevicePtr local)
{
- char *str_par;
+ char *str_par, *device;
SynapticsPrivate *priv = local->private;
enum SynapticsProtocol proto = SYN_PROTO_PSAUX;
- str_par = xf86FindOptionValue(local->options, "Protocol");
- if (str_par && !strcmp(str_par, "psaux")) {
- /* Already set up */
- } else if (str_par && !strcmp(str_par, "event")) {
+ device = xf86FindOptionValue(local->options, "Device");
+ if (!device) {
+ device = xf86FindOptionValue(local->options, "Path");
+ xf86SetStrOption(local->options, "Device", device);
+ }
+ if (device && strstr(device, "/dev/input/event")) {
+ /* trust the device name if we've been given one */
proto = SYN_PROTO_EVENT;
- } else if (str_par && !strcmp(str_par, "psm")) {
- proto = SYN_PROTO_PSM;
- } else if (str_par && !strcmp(str_par, "alps")) {
- proto = SYN_PROTO_ALPS;
- } else { /* default to auto-dev */
- if (event_proto_operations.AutoDevProbe(local))
+ } else {
+ str_par = xf86FindOptionValue(local->options, "Protocol");
+ if (str_par && !strcmp(str_par, "psaux")) {
+ /* Already set up */
+ } else if (str_par && !strcmp(str_par, "event")) {
proto = SYN_PROTO_EVENT;
+ } else if (str_par && !strcmp(str_par, "psm")) {
+ proto = SYN_PROTO_PSM;
+ } else if (str_par && !strcmp(str_par, "alps")) {
+ proto = SYN_PROTO_ALPS;
+ } else { /* default to auto-dev */
+ if (event_proto_operations.AutoDevProbe(local))
+ proto = SYN_PROTO_EVENT;
+ }
}
switch (proto) {
case SYN_PROTO_PSAUX: