summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-09-16 12:30:34 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-09-21 18:28:58 -0400
commitdf08ef27a7f91961c91a2a718f5d1e616f1c8e57 (patch)
tree99d85254467e408cef43014d054f0ed97b476c67 /drivers/input/mouse/psmouse-base.c
parent68d482214bb0eaac138ace329e72390d6c8d44ff (diff)
Input: psmouse - add OLPC touchpad driver
This adds support for OLPC's touchpad. It has lots of neat features, none of which are enabled because the hardware is too buggy. Instead, we use it like a normal touchpad, but with a number of workarounds in place to deal with the frequent hardware spasms. Humidity changes, sweat, tinfoil underwear, plugging in AC, drinks, evil felines.. All tend to cause the touchpad to freak out. Signed-off-by: Andres Salomon <dilinger@debian.org> 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.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index a0671e57dd8b..126e977e199e 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -25,6 +25,7 @@
#include "synaptics.h"
#include "logips2pp.h"
#include "alps.h"
+#include "hgpk.h"
#include "lifebook.h"
#include "trackpoint.h"
#include "touchkit_ps2.h"
@@ -636,8 +637,20 @@ static int psmouse_extensions(struct psmouse *psmouse,
}
}
- if (max_proto > PSMOUSE_IMEX) {
+/*
+ * Try OLPC HGPK touchpad.
+ */
+ if (max_proto > PSMOUSE_IMEX &&
+ hgpk_detect(psmouse, set_properties) == 0) {
+ if (!set_properties || hgpk_init(psmouse) == 0)
+ return PSMOUSE_HGPK;
+/*
+ * Init failed, try basic relative protocols
+ */
+ max_proto = PSMOUSE_IMEX;
+ }
+ if (max_proto > PSMOUSE_IMEX) {
if (genius_detect(psmouse, set_properties) == 0)
return PSMOUSE_GENPS;
@@ -768,6 +781,14 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.detect = touchkit_ps2_detect,
},
#endif
+#ifdef CONFIG_MOUSE_PS2_OLPC
+ {
+ .type = PSMOUSE_HGPK,
+ .name = "OLPC HGPK",
+ .alias = "hgpk",
+ .detect = hgpk_detect,
+ },
+#endif
{
.type = PSMOUSE_CORTRON,
.name = "CortronPS/2",