diff options
| author | Dmitry Torokhov <dtor_core@ameritech.net> | 2004-07-19 12:39:18 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2004-07-19 12:39:18 -0500 |
| commit | 0edcd2c4dacaa8745b291fdccc2e886279e8bc85 (patch) | |
| tree | 7ccc5e85d0254c2674ed07c86cf66be77ddf572c /drivers/input/mouse/psmouse.h | |
| parent | a45857d153327ccdc26e31b0b7f84a0bd6dc9e0f (diff) | |
Input: do not call protocol handler in psmouse unless mouse is
filly initialized - helps when USB Legacy emulation gets
in our way and starts generating junk data stream while
psmouse is detecting hardware
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/psmouse.h')
| -rw-r--r-- | drivers/input/mouse/psmouse.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index 56f143453fab..936f6f1e55f6 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h @@ -17,16 +17,18 @@ #define PSMOUSE_RET_ACK 0xfa #define PSMOUSE_RET_NAK 0xfe -/* psmouse states */ -#define PSMOUSE_CMD_MODE 0 -#define PSMOUSE_ACTIVATED 1 -#define PSMOUSE_IGNORE 2 - #define PSMOUSE_FLAG_ACK 0 /* Waiting for ACK/NAK */ #define PSMOUSE_FLAG_CMD 1 /* Waiting for command to finish */ #define PSMOUSE_FLAG_CMD1 2 /* First byte of command response */ #define PSMOUSE_FLAG_ID 3 /* First byte is not keyboard ID */ +enum psmouse_state { + PSMOUSE_IGNORE, + PSMOUSE_INITIALIZING, + PSMOUSE_CMD_MODE, + PSMOUSE_ACTIVATED, +}; + /* psmouse protocol handler return codes */ typedef enum { PSMOUSE_BAD_DATA, @@ -48,7 +50,7 @@ struct psmouse { unsigned char model; unsigned long last; unsigned long out_of_sync; - unsigned char state; + enum psmouse_state state; unsigned char nak; char error; char devname[64]; |
