diff options
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 126e977e199e..f8f86de694bb 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "lifebook.h" | 29 | #include "lifebook.h" |
30 | #include "trackpoint.h" | 30 | #include "trackpoint.h" |
31 | #include "touchkit_ps2.h" | 31 | #include "touchkit_ps2.h" |
32 | #include "elantech.h" | ||
32 | 33 | ||
33 | #define DRIVER_DESC "PS/2 mouse driver" | 34 | #define DRIVER_DESC "PS/2 mouse driver" |
34 | 35 | ||
@@ -650,6 +651,19 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
650 | max_proto = PSMOUSE_IMEX; | 651 | max_proto = PSMOUSE_IMEX; |
651 | } | 652 | } |
652 | 653 | ||
654 | /* | ||
655 | * Try Elantech touchpad. | ||
656 | */ | ||
657 | if (max_proto > PSMOUSE_IMEX && | ||
658 | elantech_detect(psmouse, set_properties) == 0) { | ||
659 | if (!set_properties || elantech_init(psmouse) == 0) | ||
660 | return PSMOUSE_ELANTECH; | ||
661 | /* | ||
662 | * Init failed, try basic relative protocols | ||
663 | */ | ||
664 | max_proto = PSMOUSE_IMEX; | ||
665 | } | ||
666 | |||
653 | if (max_proto > PSMOUSE_IMEX) { | 667 | if (max_proto > PSMOUSE_IMEX) { |
654 | if (genius_detect(psmouse, set_properties) == 0) | 668 | if (genius_detect(psmouse, set_properties) == 0) |
655 | return PSMOUSE_GENPS; | 669 | return PSMOUSE_GENPS; |
@@ -789,6 +803,15 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
789 | .detect = hgpk_detect, | 803 | .detect = hgpk_detect, |
790 | }, | 804 | }, |
791 | #endif | 805 | #endif |
806 | #ifdef CONFIG_MOUSE_PS2_ELANTECH | ||
807 | { | ||
808 | .type = PSMOUSE_ELANTECH, | ||
809 | .name = "ETPS/2", | ||
810 | .alias = "elantech", | ||
811 | .detect = elantech_detect, | ||
812 | .init = elantech_init, | ||
813 | }, | ||
814 | #endif | ||
792 | { | 815 | { |
793 | .type = PSMOUSE_CORTRON, | 816 | .type = PSMOUSE_CORTRON, |
794 | .name = "CortronPS/2", | 817 | .name = "CortronPS/2", |