summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorStephen Evanchik <evanchsa@gmail.com>2005-08-08 01:26:18 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-08-08 01:26:18 -0500
commit541e316aed6f7d6efeb427a88645c2a8f61418d6 (patch)
tree2283bae66058470f24f47240e342a032d939ff89 /drivers/input/mouse/psmouse-base.c
parent6fc32179de9e14c542e0b1760e412bc670611c53 (diff)
Input: psmouse - add support for IBM TrackPoint devices.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r--drivers/input/mouse/psmouse-base.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 2bb2fe78bdca..b3508276785f 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -25,6 +25,7 @@
#include "logips2pp.h"
#include "alps.h"
#include "lifebook.h"
+#include "trackpoint.h"
#define DRIVER_DESC "PS/2 mouse driver"
@@ -520,6 +521,12 @@ static int psmouse_extensions(struct psmouse *psmouse,
return PSMOUSE_IMPS;
/*
+ * Try to initialize the IBM TrackPoint
+ */
+ if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0)
+ return PSMOUSE_TRACKPOINT;
+
+/*
* Okay, all failed, we have a standard mouse here. The number of the buttons
* is still a question, though. We assume 3.
*/
@@ -600,6 +607,12 @@ static struct psmouse_protocol psmouse_protocols[] = {
.init = lifebook_init,
},
{
+ .type = PSMOUSE_TRACKPOINT,
+ .name = "TPPS/2",
+ .alias = "trackpoint",
+ .detect = trackpoint_detect,
+ },
+ {
.type = PSMOUSE_AUTO,
.name = "auto",
.alias = "any",
@@ -1234,7 +1247,7 @@ static int psmouse_set_maxproto(const char *val, struct kernel_param *kp)
*((unsigned int *)kp->arg) = proto->type;
- return 0; \
+ return 0;
}
static int psmouse_get_maxproto(char *buffer, struct kernel_param *kp)