diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-25 00:40:24 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-25 00:42:57 -0500 |
commit | 4a299bf591bc5bef3bde8316e603b9eaec5a7696 (patch) | |
tree | c8463d955203613a47508fa8e8f21cb2b1c2273e /drivers/input | |
parent | 1d9f26262aef6d63ff65eba0fd5f1583f342b69b (diff) |
Input: speed up suspend/shutdown for PS/2 mice and keyboards
Instead of doing full-blown reset while suspending or shutting down
the box use lighter form of reset that should take less time.
Tested-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 5 | ||||
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index a3573570c52f..1f5e2ce327d6 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = { | |||
134 | #define ATKBD_CMD_GETID 0x02f2 | 134 | #define ATKBD_CMD_GETID 0x02f2 |
135 | #define ATKBD_CMD_SETREP 0x10f3 | 135 | #define ATKBD_CMD_SETREP 0x10f3 |
136 | #define ATKBD_CMD_ENABLE 0x00f4 | 136 | #define ATKBD_CMD_ENABLE 0x00f4 |
137 | #define ATKBD_CMD_RESET_DIS 0x00f5 | 137 | #define ATKBD_CMD_RESET_DIS 0x00f5 /* Reset to defaults and disable */ |
138 | #define ATKBD_CMD_RESET_DEF 0x00f6 /* Reset to defaults */ | ||
138 | #define ATKBD_CMD_SETALL_MBR 0x00fa | 139 | #define ATKBD_CMD_SETALL_MBR 0x00fa |
139 | #define ATKBD_CMD_RESET_BAT 0x02ff | 140 | #define ATKBD_CMD_RESET_BAT 0x02ff |
140 | #define ATKBD_CMD_RESEND 0x00fe | 141 | #define ATKBD_CMD_RESEND 0x00fe |
@@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio) | |||
836 | struct atkbd *atkbd = serio_get_drvdata(serio); | 837 | struct atkbd *atkbd = serio_get_drvdata(serio); |
837 | 838 | ||
838 | atkbd_disable(atkbd); | 839 | atkbd_disable(atkbd); |
839 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); | 840 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF); |
840 | } | 841 | } |
841 | 842 | ||
842 | 843 | ||
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index fd0bc094616a..401ac6b6edd4 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -1137,7 +1137,10 @@ static void psmouse_cleanup(struct serio *serio) | |||
1137 | if (psmouse->cleanup) | 1137 | if (psmouse->cleanup) |
1138 | psmouse->cleanup(psmouse); | 1138 | psmouse->cleanup(psmouse); |
1139 | 1139 | ||
1140 | psmouse_reset(psmouse); | 1140 | /* |
1141 | * Reset the mouse to defaults (bare PS/2 protocol). | ||
1142 | */ | ||
1143 | ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); | ||
1141 | 1144 | ||
1142 | /* | 1145 | /* |
1143 | * Some boxes, such as HP nx7400, get terribly confused if mouse | 1146 | * Some boxes, such as HP nx7400, get terribly confused if mouse |