Skip to content

Commit e3a7921

Browse files
jwrdegoededtor
authored andcommitted
Input: alps - report V2 Dualpoint Stick events via the right evdev node
On V2 devices the DualPoint Stick reports bare packets, these should be reported via the "AlpsPS/2 ALPS DualPoint Stick" dev2 evdev node, which also has the INPUT_PROP_POINTING_STICK propbit set. Note that since there is no way to distinguish these packets from an external PS/2 mouse (insofar as these laptops have an external PS/2 port) this means that we will be reporting PS/2 mouse events via this evdev node too, as we've been doing in kernel 3.19 and older. This has been tested on a Dell Latitude D620 and a Dell Latitude E6400, which both have a V2 touchpad + a DualPoint Stick which reports bare packets. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 59c30af commit e3a7921

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/input/mouse/alps.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,12 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
11611161
struct alps_data *priv = psmouse->private;
11621162
struct input_dev *dev;
11631163

1164-
if (unlikely(IS_ERR_OR_NULL(priv->dev3))) {
1164+
/* Figure out which device to use to report the bare packet */
1165+
if (priv->proto_version == ALPS_PROTO_V2 &&
1166+
(priv->flags & ALPS_DUALPOINT)) {
1167+
/* On V2 devices the DualPoint Stick reports bare packets */
1168+
dev = priv->dev2;
1169+
} else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) {
11651170
/* Register dev3 mouse if we received PS/2 packet first time */
11661171
if (!IS_ERR(priv->dev3))
11671172
psmouse_queue_work(psmouse, &priv->dev3_register_work,

0 commit comments

Comments
 (0)