aboutsummaryrefslogtreecommitdiffstats
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 @@
25#include "synaptics.h" 25#include "synaptics.h"
26#include "logips2pp.h" 26#include "logips2pp.h"
27#include "alps.h" 27#include "alps.h"
28#include "hgpk.h"
28#include "lifebook.h" 29#include "lifebook.h"
29#include "trackpoint.h" 30#include "trackpoint.h"
30#include "touchkit_ps2.h" 31#include "touchkit_ps2.h"
@@ -636,8 +637,20 @@ static int psmouse_extensions(struct psmouse *psmouse,
636 } 637 }
637 } 638 }
638 639
639 if (max_proto > PSMOUSE_IMEX) { 640/*
641 * Try OLPC HGPK touchpad.
642 */
643 if (max_proto > PSMOUSE_IMEX &&
644 hgpk_detect(psmouse, set_properties) == 0) {
645 if (!set_properties || hgpk_init(psmouse) == 0)
646 return PSMOUSE_HGPK;
647/*
648 * Init failed, try basic relative protocols
649 */
650 max_proto = PSMOUSE_IMEX;
651 }
640 652
653 if (max_proto > PSMOUSE_IMEX) {
641 if (genius_detect(psmouse, set_properties) == 0) 654 if (genius_detect(psmouse, set_properties) == 0)
642 return PSMOUSE_GENPS; 655 return PSMOUSE_GENPS;
643 656
@@ -768,6 +781,14 @@ static const struct psmouse_protocol psmouse_protocols[] = {
768 .detect = touchkit_ps2_detect, 781 .detect = touchkit_ps2_detect,
769 }, 782 },
770#endif 783#endif
784#ifdef CONFIG_MOUSE_PS2_OLPC
785 {
786 .type = PSMOUSE_HGPK,
787 .name = "OLPC HGPK",
788 .alias = "hgpk",
789 .detect = hgpk_detect,
790 },
791#endif
771 { 792 {
772 .type = PSMOUSE_CORTRON, 793 .type = PSMOUSE_CORTRON,
773 .name = "CortronPS/2", 794 .name = "CortronPS/2",