Commit 4a299bf5 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarAlan Stern <stern@rowland.harvard.edu>
Tested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 1d9f2626
...@@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = { ...@@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = {
#define ATKBD_CMD_GETID 0x02f2 #define ATKBD_CMD_GETID 0x02f2
#define ATKBD_CMD_SETREP 0x10f3 #define ATKBD_CMD_SETREP 0x10f3
#define ATKBD_CMD_ENABLE 0x00f4 #define ATKBD_CMD_ENABLE 0x00f4
#define ATKBD_CMD_RESET_DIS 0x00f5 #define ATKBD_CMD_RESET_DIS 0x00f5 /* Reset to defaults and disable */
#define ATKBD_CMD_RESET_DEF 0x00f6 /* Reset to defaults */
#define ATKBD_CMD_SETALL_MBR 0x00fa #define ATKBD_CMD_SETALL_MBR 0x00fa
#define ATKBD_CMD_RESET_BAT 0x02ff #define ATKBD_CMD_RESET_BAT 0x02ff
#define ATKBD_CMD_RESEND 0x00fe #define ATKBD_CMD_RESEND 0x00fe
...@@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio) ...@@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio)
struct atkbd *atkbd = serio_get_drvdata(serio); struct atkbd *atkbd = serio_get_drvdata(serio);
atkbd_disable(atkbd); atkbd_disable(atkbd);
ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF);
} }
......
...@@ -1137,7 +1137,10 @@ static void psmouse_cleanup(struct serio *serio) ...@@ -1137,7 +1137,10 @@ static void psmouse_cleanup(struct serio *serio)
if (psmouse->cleanup) if (psmouse->cleanup)
psmouse->cleanup(psmouse); psmouse->cleanup(psmouse);
psmouse_reset(psmouse); /*
* Reset the mouse to defaults (bare PS/2 protocol).
*/
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
/* /*
* Some boxes, such as HP nx7400, get terribly confused if mouse * Some boxes, such as HP nx7400, get terribly confused if mouse
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment