diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-01-14 00:27:37 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-01-14 00:27:37 -0500 |
commit | f0d5c6f419d3a10443f66d6835855837eae4ac4b (patch) | |
tree | edbaf897d4618095a69865f198d26d2d017813d4 /drivers/input/mouse/psmouse.h | |
parent | b65d0d1bacfdbb4a134a7ebd16f280d5d42241cb (diff) |
Input: psmouse - attempt to re-synchronize mouse every 5 seconds
This should help driver to deal vith KVMs that reset mice when
switching between boxes.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/psmouse.h')
-rw-r--r-- | drivers/input/mouse/psmouse.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index 7c4192bd1279..4d9107fba6a1 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #define PSMOUSE_CMD_GETINFO 0x03e9 | 7 | #define PSMOUSE_CMD_GETINFO 0x03e9 |
8 | #define PSMOUSE_CMD_SETSTREAM 0x00ea | 8 | #define PSMOUSE_CMD_SETSTREAM 0x00ea |
9 | #define PSMOUSE_CMD_SETPOLL 0x00f0 | 9 | #define PSMOUSE_CMD_SETPOLL 0x00f0 |
10 | #define PSMOUSE_CMD_POLL 0x03eb | 10 | #define PSMOUSE_CMD_POLL 0x00eb /* caller sets number of bytes to receive */ |
11 | #define PSMOUSE_CMD_GETID 0x02f2 | 11 | #define PSMOUSE_CMD_GETID 0x02f2 |
12 | #define PSMOUSE_CMD_SETRATE 0x10f3 | 12 | #define PSMOUSE_CMD_SETRATE 0x10f3 |
13 | #define PSMOUSE_CMD_ENABLE 0x00f4 | 13 | #define PSMOUSE_CMD_ENABLE 0x00f4 |
@@ -23,6 +23,7 @@ | |||
23 | enum psmouse_state { | 23 | enum psmouse_state { |
24 | PSMOUSE_IGNORE, | 24 | PSMOUSE_IGNORE, |
25 | PSMOUSE_INITIALIZING, | 25 | PSMOUSE_INITIALIZING, |
26 | PSMOUSE_RESYNCING, | ||
26 | PSMOUSE_CMD_MODE, | 27 | PSMOUSE_CMD_MODE, |
27 | PSMOUSE_ACTIVATED, | 28 | PSMOUSE_ACTIVATED, |
28 | }; | 29 | }; |
@@ -38,15 +39,19 @@ struct psmouse { | |||
38 | void *private; | 39 | void *private; |
39 | struct input_dev *dev; | 40 | struct input_dev *dev; |
40 | struct ps2dev ps2dev; | 41 | struct ps2dev ps2dev; |
42 | struct work_struct resync_work; | ||
41 | char *vendor; | 43 | char *vendor; |
42 | char *name; | 44 | char *name; |
43 | unsigned char packet[8]; | 45 | unsigned char packet[8]; |
46 | unsigned char badbyte; | ||
44 | unsigned char pktcnt; | 47 | unsigned char pktcnt; |
45 | unsigned char pktsize; | 48 | unsigned char pktsize; |
46 | unsigned char type; | 49 | unsigned char type; |
50 | unsigned char acks_disable_command; | ||
47 | unsigned int model; | 51 | unsigned int model; |
48 | unsigned long last; | 52 | unsigned long last; |
49 | unsigned long out_of_sync; | 53 | unsigned long out_of_sync; |
54 | unsigned long num_resyncs; | ||
50 | enum psmouse_state state; | 55 | enum psmouse_state state; |
51 | char devname[64]; | 56 | char devname[64]; |
52 | char phys[32]; | 57 | char phys[32]; |
@@ -54,6 +59,7 @@ struct psmouse { | |||
54 | unsigned int rate; | 59 | unsigned int rate; |
55 | unsigned int resolution; | 60 | unsigned int resolution; |
56 | unsigned int resetafter; | 61 | unsigned int resetafter; |
62 | unsigned int resync_time; | ||
57 | unsigned int smartscroll; /* Logitech only */ | 63 | unsigned int smartscroll; /* Logitech only */ |
58 | 64 | ||
59 | psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse, struct pt_regs *regs); | 65 | psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse, struct pt_regs *regs); |
@@ -62,6 +68,7 @@ struct psmouse { | |||
62 | 68 | ||
63 | int (*reconnect)(struct psmouse *psmouse); | 69 | int (*reconnect)(struct psmouse *psmouse); |
64 | void (*disconnect)(struct psmouse *psmouse); | 70 | void (*disconnect)(struct psmouse *psmouse); |
71 | int (*poll)(struct psmouse *psmouse); | ||
65 | 72 | ||
66 | void (*pt_activate)(struct psmouse *psmouse); | 73 | void (*pt_activate)(struct psmouse *psmouse); |
67 | void (*pt_deactivate)(struct psmouse *psmouse); | 74 | void (*pt_deactivate)(struct psmouse *psmouse); |