aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-11-08 03:00:35 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-11-10 00:23:31 -0500
commit7968a5dd492ccc38345013e534ad4c8d6eb60ed1 (patch)
treeb7ba40bb0dc4c92471a40e5879e95abdc9b5036f /drivers/input/mouse/psmouse-base.c
parent76496e7a02e99d42844f4fffa145b81e513e7acd (diff)
Input: synaptics - add support for Relative mode
Currently, the synaptics driver puts the device into Absolute mode. As explained in the synaptics documentation section 3.2, in this mode, the device sends a continuous stream of packets at the maximum rate to the host when the user's fingers are near or on the pad or pressing buttons, and continues streaming for 1 second afterwards. These packets are even sent when there is no new information to report, even when they are duplicates of the previous packet. For embedded systems this is a bit much - it results in a huge and uninterrupted stream of interrupts at high rate. This patch adds support for Relative mode, which can be selected as a new psmouse protocol. In this mode, the device does not send duplicate packets and acts like a standard PS/2 mouse. However, synaptics-specific functionality is still available, such as the ability to set the packet rate, and rather than disabling gestures and taps at the hardware level unconditionally, a 'synaptics_disable_gesture' sysfs attribute has been added to allow control of this functionality. This solves a long standing OLPC issue: synaptics hardware enables tap to click by default (even in the default relative mode), but we have found this to be inappropriate for young children and first time computer users. Enabling the synaptics driver disables tap-to-click, but we have previously been unable to use this because it also enables Absolute mode, which is too "spammy" for our desires and actually overloads our EC with its continuous stream of packets. Now we can enable the synaptics driver, disabling tap to click while retaining the less noisy Relative mode. Signed-off-by: Daniel Drake <dsd@laptop.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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index a6973e575aa9..200be9c9dbc7 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -127,7 +127,7 @@ struct psmouse_protocol {
127 * relevant events to the input module once full packet has arrived. 127 * relevant events to the input module once full packet has arrived.
128 */ 128 */
129 129
130static psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse) 130psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
131{ 131{
132 struct input_dev *dev = psmouse->dev; 132 struct input_dev *dev = psmouse->dev;
133 unsigned char *packet = psmouse->packet; 133 unsigned char *packet = psmouse->packet;
@@ -819,6 +819,13 @@ static const struct psmouse_protocol psmouse_protocols[] = {
819 .detect = synaptics_detect, 819 .detect = synaptics_detect,
820 .init = synaptics_init, 820 .init = synaptics_init,
821 }, 821 },
822 {
823 .type = PSMOUSE_SYNAPTICS_RELATIVE,
824 .name = "SynRelPS/2",
825 .alias = "synaptics-relative",
826 .detect = synaptics_detect,
827 .init = synaptics_init_relative,
828 },
822#endif 829#endif
823#ifdef CONFIG_MOUSE_PS2_ALPS 830#ifdef CONFIG_MOUSE_PS2_ALPS
824 { 831 {