提交 ba44995a 编写于 作者: D Dmitry Torokhov

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: NDmitry Torokhov <dtor@mail.ru>
上级 f5e9c9ca
...@@ -527,11 +527,15 @@ static int psmouse_extensions(struct psmouse *psmouse, ...@@ -527,11 +527,15 @@ static int psmouse_extensions(struct psmouse *psmouse,
if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0) if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0)
return PSMOUSE_PS2PP; return PSMOUSE_PS2PP;
if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0)
return PSMOUSE_TRACKPOINT;
/* /*
* Reset to defaults in case the device got confused by extended * Reset to defaults in case the device got confused by extended
* protocol probes. * protocol probes. Note that we do full reset becuase some mice
* put themselves to sleep when see PSMOUSE_RESET_DIS.
*/ */
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); psmouse_reset(psmouse);
if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse, set_properties) == 0) if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse, set_properties) == 0)
return PSMOUSE_IMEX; return PSMOUSE_IMEX;
...@@ -539,12 +543,6 @@ static int psmouse_extensions(struct psmouse *psmouse, ...@@ -539,12 +543,6 @@ static int psmouse_extensions(struct psmouse *psmouse,
if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse, set_properties) == 0) if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse, set_properties) == 0)
return PSMOUSE_IMPS; return PSMOUSE_IMPS;
/*
* Try to initialize the IBM TrackPoint
*/
if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0)
return PSMOUSE_TRACKPOINT;
/* /*
* Okay, all failed, we have a standard mouse here. The number of the buttons * Okay, all failed, we have a standard mouse here. The number of the buttons
* is still a question, though. We assume 3. * is still a question, though. We assume 3.
...@@ -559,7 +557,6 @@ static int psmouse_extensions(struct psmouse *psmouse, ...@@ -559,7 +557,6 @@ static int psmouse_extensions(struct psmouse *psmouse,
* extensions. * extensions.
*/ */
psmouse_reset(psmouse); psmouse_reset(psmouse);
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
} }
return PSMOUSE_PS2; return PSMOUSE_PS2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册