summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.h
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2015-01-14 13:18:30 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-02-15 15:44:19 -0800
commit04aae283ba6a8cd4851d937bf9c6d6ef0361d794 (patch)
tree98fa424384af30ad1ceb63be9d88e85e291375d1 /drivers/input/mouse/alps.h
parenta09221e83e13e09a33109b9b037484eade901cea (diff)
downloadlinux-04aae283ba6a8cd4851d937bf9c6d6ef0361d794.tar.bz2
Input: ALPS - do not mix trackstick and external PS/2 mouse data
Previously dev2 device was used for both external PS/2 mouse and internal trackstick device (if available). This change introduces dev3 device which is used for external PS/2 mouse data and dev2 is now used only for trackstick. In case that trackstick is not present dev2 is not created, so userspace does not see non existent device in system. Because laptops with ALPS devices often do not use i8042 active multiplexing all data (from touchpad, trackstick and external PS/2 mouse) come to one port. So it is not possible to know if external PS/2 mouse is connected or not. In most cases external PS/2 mouse is not connected so driver will create dev3 input device after first bare PS/2 packet will be received. So there will not be "ghost" input device. This change also helps in identifying possible problems in future if driver decides to report 6-bytes trackstick packets as 3-bytes bare PS/2 (data will be reported to dev3 instead dev2). Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.h')
-rw-r--r--drivers/input/mouse/alps.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index c79523562608..02513c0502fc 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -141,8 +141,12 @@ struct alps_fields {
/**
* struct alps_data - private data structure for the ALPS driver
- * @dev2: "Relative" device used to report trackstick or mouse activity.
- * @phys: Physical path for the relative device.
+ * @psmouse: Pointer to parent psmouse device
+ * @dev2: Trackstick device (can be NULL).
+ * @dev3: Generic PS/2 mouse (can be NULL, delayed registering).
+ * @phys2: Physical path for the trackstick device.
+ * @phys3: Physical path for the generic PS/2 mouse.
+ * @dev3_register_work: Delayed work for registering PS/2 mouse.
* @nibble_commands: Command mapping used for touchpad register accesses.
* @addr_command: Command used to tell the touchpad that a register address
* follows.
@@ -169,8 +173,12 @@ struct alps_fields {
* @timer: Timer for flushing out the final report packet in the stream.
*/
struct alps_data {
+ struct psmouse *psmouse;
struct input_dev *dev2;
- char phys[32];
+ struct input_dev *dev3;
+ char phys2[32];
+ char phys3[32];
+ struct delayed_work dev3_register_work;
/* these are autodetected when the device is identified */
const struct alps_nibble_commands *nibble_commands;