diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-05-13 03:42:23 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-05-13 03:43:26 -0400 |
commit | ef110b24e28f36620f63dab94708a17c7e267358 (patch) | |
tree | 0b194aa3d7069983de14d821c3a044557008ce9d /drivers/input/mouse | |
parent | 504e8beed161bd11a2c6cbb8aaf352c14d39b5bb (diff) |
Input: psmouse - reset all types of mice before reconnecting
Synaptics hardware requires resetting device after suspend to ram
in order for the device to be operational. The reset lives in
synaptics-specific reconnect handler, but it is not being invoked
if synaptics support is disabled and the device is handled as a
standard PS/2 device (bare or IntelliMouse protocol).
Let's add reset into generic reconnect handler as well.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index cbc807264940..a3c97315a473 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -1394,6 +1394,7 @@ static int psmouse_reconnect(struct serio *serio) | |||
1394 | struct psmouse *psmouse = serio_get_drvdata(serio); | 1394 | struct psmouse *psmouse = serio_get_drvdata(serio); |
1395 | struct psmouse *parent = NULL; | 1395 | struct psmouse *parent = NULL; |
1396 | struct serio_driver *drv = serio->drv; | 1396 | struct serio_driver *drv = serio->drv; |
1397 | unsigned char type; | ||
1397 | int rc = -1; | 1398 | int rc = -1; |
1398 | 1399 | ||
1399 | if (!drv || !psmouse) { | 1400 | if (!drv || !psmouse) { |
@@ -1413,10 +1414,15 @@ static int psmouse_reconnect(struct serio *serio) | |||
1413 | if (psmouse->reconnect) { | 1414 | if (psmouse->reconnect) { |
1414 | if (psmouse->reconnect(psmouse)) | 1415 | if (psmouse->reconnect(psmouse)) |
1415 | goto out; | 1416 | goto out; |
1416 | } else if (psmouse_probe(psmouse) < 0 || | 1417 | } else { |
1417 | psmouse->type != psmouse_extensions(psmouse, | 1418 | psmouse_reset(psmouse); |
1418 | psmouse_max_proto, false)) { | 1419 | |
1419 | goto out; | 1420 | if (psmouse_probe(psmouse) < 0) |
1421 | goto out; | ||
1422 | |||
1423 | type = psmouse_extensions(psmouse, psmouse_max_proto, false); | ||
1424 | if (psmouse->type != type) | ||
1425 | goto out; | ||
1420 | } | 1426 | } |
1421 | 1427 | ||
1422 | /* ok, the device type (and capabilities) match the old one, | 1428 | /* ok, the device type (and capabilities) match the old one, |