aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-09-08 17:42:12 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-09-08 17:58:11 -0400
commit7611392fe8ff95ecae528b01a815ae3d72ca6b95 (patch)
tree36f8cfcc461ac39fe10bba2fc59fc9c09cac9319 /drivers/input/mouse/alps.c
parent271329b3c798b2102120f5df829071c211ef00ed (diff)
Input: add INPUT_PROP_POINTING_STICK property
It is useful for userspace to know that there not dealing with a regular mouse but rather with a pointing stick (e.g. a trackpoint) so that userspace can e.g. automatically enable middle button scrollwheel emulation. It is impossible to tell the difference from the evdev info without resorting to putting a list of device / driver names in userspace, this is undesirable. Add a property which allows userspace to see if a device is a pointing stick, and set it on all the pointing stick drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r--drivers/input/mouse/alps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index a956b980ee73..9d9e5076d402 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -2373,6 +2373,9 @@ int alps_init(struct psmouse *psmouse)
2373 dev2->keybit[BIT_WORD(BTN_LEFT)] = 2373 dev2->keybit[BIT_WORD(BTN_LEFT)] =
2374 BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT); 2374 BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_MIDDLE) | BIT_MASK(BTN_RIGHT);
2375 2375
2376 if (priv->flags & ALPS_DUALPOINT)
2377 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit);
2378
2376 if (input_register_device(priv->dev2)) 2379 if (input_register_device(priv->dev2))
2377 goto init_fail; 2380 goto init_fail;
2378 2381