Commit 05be1d07 authored by Mathias Gottschlag's avatar Mathias Gottschlag Committed by Dmitry Torokhov

Input: psmouse - support for the FocalTech PS/2 protocol extensions

Most of the protocol for these touchpads has been reverse engineered. This
commit adds a basic multitouch-capable driver.

A lot of the protocol is still unknown. Especially, we don't know how to
identify the device yet apart from the PNP ID.

The previous workaround for these devices has been left in place in case
the driver is not compiled into the kernel or in case some other device
with the same PNP ID is not recognized by the driver yet still has the same
problems with the device probing code.
Signed-off-by: default avatarMathias Gottschlag <mgottschlag@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 5fafed3e
...@@ -146,6 +146,16 @@ config MOUSE_PS2_OLPC ...@@ -146,6 +146,16 @@ config MOUSE_PS2_OLPC
If unsure, say N. If unsure, say N.
config MOUSE_PS2_FOCALTECH
bool "FocalTech PS/2 mouse protocol extension" if EXPERT
default y
depends on MOUSE_PS2
help
Say Y here if you have a FocalTech PS/2 TouchPad connected to
your system.
If unsure, say Y.
config MOUSE_SERIAL config MOUSE_SERIAL
tristate "Serial mouse" tristate "Serial mouse"
select SERIO select SERIO
......
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Focaltech TouchPad PS/2 mouse driver * Focaltech TouchPad PS/2 mouse driver
* *
* Copyright (c) 2014 Red Hat Inc. * Copyright (c) 2014 Red Hat Inc.
* Copyright (c) 2014 Mathias Gottschlag <mgottschlag@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -18,5 +19,6 @@ ...@@ -18,5 +19,6 @@
int focaltech_detect(struct psmouse *psmouse, bool set_properties); int focaltech_detect(struct psmouse *psmouse, bool set_properties);
int focaltech_init(struct psmouse *psmouse); int focaltech_init(struct psmouse *psmouse);
bool focaltech_supported(void);
#endif #endif
...@@ -725,16 +725,19 @@ static int psmouse_extensions(struct psmouse *psmouse, ...@@ -725,16 +725,19 @@ static int psmouse_extensions(struct psmouse *psmouse,
/* Always check for focaltech, this is safe as it uses pnp-id matching */ /* Always check for focaltech, this is safe as it uses pnp-id matching */
if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) { if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) {
if (!set_properties || focaltech_init(psmouse) == 0) { if (max_proto > PSMOUSE_IMEX) {
/* if (!set_properties || focaltech_init(psmouse) == 0) {
* Not supported yet, use bare protocol. if (focaltech_supported())
* Note that we need to also restrict return PSMOUSE_FOCALTECH;
* psmouse_max_proto so that psmouse_initialize() /*
* does not try to reset rate and resolution, * Note that we need to also restrict
* because even that upsets the device. * psmouse_max_proto so that psmouse_initialize()
*/ * does not try to reset rate and resolution,
psmouse_max_proto = PSMOUSE_PS2; * because even that upsets the device.
return PSMOUSE_PS2; */
psmouse_max_proto = PSMOUSE_PS2;
return PSMOUSE_PS2;
}
} }
} }
...@@ -1063,6 +1066,15 @@ static const struct psmouse_protocol psmouse_protocols[] = { ...@@ -1063,6 +1066,15 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.alias = "cortps", .alias = "cortps",
.detect = cortron_detect, .detect = cortron_detect,
}, },
#ifdef CONFIG_MOUSE_PS2_FOCALTECH
{
.type = PSMOUSE_FOCALTECH,
.name = "FocalTechPS/2",
.alias = "focaltech",
.detect = focaltech_detect,
.init = focaltech_init,
},
#endif
{ {
.type = PSMOUSE_AUTO, .type = PSMOUSE_AUTO,
.name = "auto", .name = "auto",
......
...@@ -96,6 +96,7 @@ enum psmouse_type { ...@@ -96,6 +96,7 @@ enum psmouse_type {
PSMOUSE_FSP, PSMOUSE_FSP,
PSMOUSE_SYNAPTICS_RELATIVE, PSMOUSE_SYNAPTICS_RELATIVE,
PSMOUSE_CYPRESS, PSMOUSE_CYPRESS,
PSMOUSE_FOCALTECH,
PSMOUSE_AUTO /* This one should always be last */ PSMOUSE_AUTO /* This one should always be last */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment