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>
This commit is contained in:
Dudley Du
2013-01-05 00:14:22 -08:00
committed by Dmitry Torokhov
parent 80524f083e
commit 0799a924bc
6 changed files with 960 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
#include "touchkit_ps2.h"
#include "elantech.h"
#include "sentelic.h"
#include "cypress_ps2.h"
#define DRIVER_DESC "PS/2 mouse driver"
@@ -758,6 +759,28 @@ static int psmouse_extensions(struct psmouse *psmouse,
synaptics_reset(psmouse);
}
/*
* Try Cypress Trackpad.
* Must try it before Finger Sensing Pad because Finger Sensing Pad probe
* upsets some modules of Cypress Trackpads.
*/
if (max_proto > PSMOUSE_IMEX &&
cypress_detect(psmouse, set_properties) == 0) {
if (cypress_supported()) {
if (cypress_init(psmouse) == 0)
return PSMOUSE_CYPRESS;
/*
* Finger Sensing Pad probe upsets some modules of
* Cypress Trackpad, must avoid Finger Sensing Pad
* probe if Cypress Trackpad device detected.
*/
return PSMOUSE_PS2;
}
max_proto = PSMOUSE_IMEX;
}
/*
* Try ALPS TouchPad
*/
@@ -896,6 +919,15 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.alias = "thinkps",
.detect = thinking_detect,
},
#ifdef CONFIG_MOUSE_PS2_CYPRESS
{
.type = PSMOUSE_CYPRESS,
.name = "CyPS/2",
.alias = "cypress",
.detect = cypress_detect,
.init = cypress_init,
},
#endif
{
.type = PSMOUSE_GENPS,
.name = "GenPS/2",