aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorDudley Du <dudl@cypress.com>2013-01-05 03:14:22 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-01-17 03:27:34 -0500
commit0799a924bc93ba46a23e8e7e6b1431ab585fd2ea (patch)
tree23e95e1d7cce9887aa25ea66dac40f988bf5ee14 /drivers/input/mouse/psmouse-base.c
parent80524f083e2c3e70057f5bb476db92baa14cb22b (diff)
Input: add support for Cypress PS/2 Trackpads
This driver, submitted on behalf of Cypress Semiconductor Corporation and additional contributors, provides support for the Cypress PS/2 Trackpad. Original code contributed by Dudley Du (Cypress Semiconductor Corporation), modified by Kamal Mostafa and Kyle Fazzari. BugLink: http://launchpad.net/bugs/978807 Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Kyle Fazzari <git@status.e4ward.com> Signed-off-by: Mario Limonciello <mario_limonciello@dell.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r--drivers/input/mouse/psmouse-base.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 22fe2547e169..cff065f6261c 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -34,6 +34,7 @@
34#include "touchkit_ps2.h" 34#include "touchkit_ps2.h"
35#include "elantech.h" 35#include "elantech.h"
36#include "sentelic.h" 36#include "sentelic.h"
37#include "cypress_ps2.h"
37 38
38#define DRIVER_DESC "PS/2 mouse driver" 39#define DRIVER_DESC "PS/2 mouse driver"
39 40
@@ -759,6 +760,28 @@ static int psmouse_extensions(struct psmouse *psmouse,
759 } 760 }
760 761
761/* 762/*
763 * Try Cypress Trackpad.
764 * Must try it before Finger Sensing Pad because Finger Sensing Pad probe
765 * upsets some modules of Cypress Trackpads.
766 */
767 if (max_proto > PSMOUSE_IMEX &&
768 cypress_detect(psmouse, set_properties) == 0) {
769 if (cypress_supported()) {
770 if (cypress_init(psmouse) == 0)
771 return PSMOUSE_CYPRESS;
772
773 /*
774 * Finger Sensing Pad probe upsets some modules of
775 * Cypress Trackpad, must avoid Finger Sensing Pad
776 * probe if Cypress Trackpad device detected.
777 */
778 return PSMOUSE_PS2;
779 }
780
781 max_proto = PSMOUSE_IMEX;
782 }
783
784/*
762 * Try ALPS TouchPad 785 * Try ALPS TouchPad
763 */ 786 */
764 if (max_proto > PSMOUSE_IMEX) { 787 if (max_proto > PSMOUSE_IMEX) {
@@ -896,6 +919,15 @@ static const struct psmouse_protocol psmouse_protocols[] = {
896 .alias = "thinkps", 919 .alias = "thinkps",
897 .detect = thinking_detect, 920 .detect = thinking_detect,
898 }, 921 },
922#ifdef CONFIG_MOUSE_PS2_CYPRESS
923 {
924 .type = PSMOUSE_CYPRESS,
925 .name = "CyPS/2",
926 .alias = "cypress",
927 .detect = cypress_detect,
928 .init = cypress_init,
929 },
930#endif
899 { 931 {
900 .type = PSMOUSE_GENPS, 932 .type = PSMOUSE_GENPS,
901 .name = "GenPS/2", 933 .name = "GenPS/2",