提交 4d368456 编写于 作者: A Andy Whitcroft 提交者: Dmitry Torokhov

Input: synaptics - ensure we reset the device on resume

When resuming from suspend newer Synaptics touchpads do not recover
correctly.  Analysis of the resume sequence as applied in Linux was
compared to that of other operating systems.  This indicated that the
other OSs were resetting the mouse before attempting to detect it (for
all Synaptics touchpads, old and new).  Applying this same modification
fixes these newer Synaptics touchpads and brings the driver into line
with common OS reset behaviour.
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 139ebe8d
...@@ -182,11 +182,6 @@ static int synaptics_identify(struct psmouse *psmouse) ...@@ -182,11 +182,6 @@ static int synaptics_identify(struct psmouse *psmouse)
static int synaptics_query_hardware(struct psmouse *psmouse) static int synaptics_query_hardware(struct psmouse *psmouse)
{ {
int retries = 0;
while ((retries++ < 3) && psmouse_reset(psmouse))
/* empty */;
if (synaptics_identify(psmouse)) if (synaptics_identify(psmouse))
return -1; return -1;
if (synaptics_model_id(psmouse)) if (synaptics_model_id(psmouse))
...@@ -582,6 +577,8 @@ static int synaptics_reconnect(struct psmouse *psmouse) ...@@ -582,6 +577,8 @@ static int synaptics_reconnect(struct psmouse *psmouse)
struct synaptics_data *priv = psmouse->private; struct synaptics_data *priv = psmouse->private;
struct synaptics_data old_priv = *priv; struct synaptics_data old_priv = *priv;
psmouse_reset(psmouse);
if (synaptics_detect(psmouse, 0)) if (synaptics_detect(psmouse, 0))
return -1; return -1;
...@@ -640,6 +637,8 @@ int synaptics_init(struct psmouse *psmouse) ...@@ -640,6 +637,8 @@ int synaptics_init(struct psmouse *psmouse)
if (!priv) if (!priv)
return -1; return -1;
psmouse_reset(psmouse);
if (synaptics_query_hardware(psmouse)) { if (synaptics_query_hardware(psmouse)) {
printk(KERN_ERR "Unable to query Synaptics hardware.\n"); printk(KERN_ERR "Unable to query Synaptics hardware.\n");
goto init_fail; goto init_fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册