diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-12-21 00:51:31 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-12-21 00:51:31 -0500 |
commit | ba44995a1e84b6cebf32e61d9492e8e133d192ce (patch) | |
tree | b38bdd5728389c2896cba1930edad02ffa222b41 /drivers/input/mouse | |
parent | f5e9c9ca54e31c0f629bae487eadaa5b8515b86d (diff) |
Input: psmouse - don't leave mouse asleep
It looks like quite a few mice out there treat PSMOUSE_RESET_DIS
as a powerdown request and turn off the light rendering the mouse
unusable.
Vojtech recommended to switch from PSMOUSE_RESET_DIS to full reset,
however we don't want to do that everywhere as full reset is pretty
slow. Instead we only use it before probing for "generic" protocols,
such as IntelliMouse and Explorer, to make sure that the mouse will
be woken up if it went to sleep as a result of PSMOUSE_RESET_DIS
issued earlier.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 6ee9999a2eaa..4d5ecc04c5b6 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -527,11 +527,15 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
527 | if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0) | 527 | if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0) |
528 | return PSMOUSE_PS2PP; | 528 | return PSMOUSE_PS2PP; |
529 | 529 | ||
530 | if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0) | ||
531 | return PSMOUSE_TRACKPOINT; | ||
532 | |||
530 | /* | 533 | /* |
531 | * Reset to defaults in case the device got confused by extended | 534 | * Reset to defaults in case the device got confused by extended |
532 | * protocol probes. | 535 | * protocol probes. Note that we do full reset becuase some mice |
536 | * put themselves to sleep when see PSMOUSE_RESET_DIS. | ||
533 | */ | 537 | */ |
534 | ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); | 538 | psmouse_reset(psmouse); |
535 | 539 | ||
536 | if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse, set_properties) == 0) | 540 | if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse, set_properties) == 0) |
537 | return PSMOUSE_IMEX; | 541 | return PSMOUSE_IMEX; |
@@ -540,12 +544,6 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
540 | return PSMOUSE_IMPS; | 544 | return PSMOUSE_IMPS; |
541 | 545 | ||
542 | /* | 546 | /* |
543 | * Try to initialize the IBM TrackPoint | ||
544 | */ | ||
545 | if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0) | ||
546 | return PSMOUSE_TRACKPOINT; | ||
547 | |||
548 | /* | ||
549 | * Okay, all failed, we have a standard mouse here. The number of the buttons | 547 | * Okay, all failed, we have a standard mouse here. The number of the buttons |
550 | * is still a question, though. We assume 3. | 548 | * is still a question, though. We assume 3. |
551 | */ | 549 | */ |
@@ -559,7 +557,6 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
559 | * extensions. | 557 | * extensions. |
560 | */ | 558 | */ |
561 | psmouse_reset(psmouse); | 559 | psmouse_reset(psmouse); |
562 | ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); | ||
563 | } | 560 | } |
564 | 561 | ||
565 | return PSMOUSE_PS2; | 562 | return PSMOUSE_PS2; |