Input: psmouse - add support for IBM TrackPoint devices.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Stephen Evanchik
2005-08-08 01:26:18 -05:00
committed by Dmitry Torokhov
parent 6fc32179de
commit 541e316aed
5 changed files with 460 additions and 2 deletions

View File

@@ -25,6 +25,7 @@
#include "logips2pp.h"
#include "alps.h"
#include "lifebook.h"
#include "trackpoint.h"
#define DRIVER_DESC "PS/2 mouse driver"
@@ -519,6 +520,12 @@ static int psmouse_extensions(struct psmouse *psmouse,
if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse, set_properties) == 0)
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.
@@ -599,6 +606,12 @@ static struct psmouse_protocol psmouse_protocols[] = {
.alias = "lifebook",
.init = lifebook_init,
},
{
.type = PSMOUSE_TRACKPOINT,
.name = "TPPS/2",
.alias = "trackpoint",
.detect = trackpoint_detect,
},
{
.type = PSMOUSE_AUTO,
.name = "auto",
@@ -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)