* [patch for 2.6.29? 3/3] psmouse/synaptics: ensure we reset the device on resume
@ 2009-03-04 20:10 akpm
2009-03-05 6:31 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-03-04 20:10 UTC (permalink / raw)
To: dtor; +Cc: linux-input, akpm, apw, arjan, jkosina
From: Andy Whitcroft <apw@canonical.com>
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.
This patch adds this reset by default providing a module option to
restore the previous non-reset behaviour:
psmouse.synaptics_resume_reset=N
Also a message is emmitted on resume hinting as to how to fix a broken
touchpad.
[akpm@linux-foundation.org: make message more informative, fix 80-cols]
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/input/mouse/synaptics.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff -puN drivers/input/mouse/synaptics.c~psmouse-synaptics-ensure-we-reset-the-device-on-resume drivers/input/mouse/synaptics.c
--- a/drivers/input/mouse/synaptics.c~psmouse-synaptics-ensure-we-reset-the-device-on-resume
+++ a/drivers/input/mouse/synaptics.c
@@ -60,11 +60,23 @@ static int synaptics_mode_cmd(struct psm
return 0;
}
+static int synaptics_resume_reset = 1;
+module_param(synaptics_resume_reset, bool, 0);
+MODULE_PARM_DESC(synaptics_resume_reset,
+ "Enable reset on resume for Synaptics");
+
int synaptics_detect(struct psmouse *psmouse, int set_properties)
{
struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char param[4];
+ if (synaptics_resume_reset) {
+ printk(KERN_CRIT "WARNING: synaptics was reset on resume. Try "
+ "using the synaptics_resume_reset module "
+ "parameter if you have trouble on resume\n");
+ psmouse_reset(psmouse);
+ }
+
param[0] = 0;
ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch for 2.6.29? 3/3] psmouse/synaptics: ensure we reset the device on resume
2009-03-04 20:10 [patch for 2.6.29? 3/3] psmouse/synaptics: ensure we reset the device on resume akpm
@ 2009-03-05 6:31 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2009-03-05 6:31 UTC (permalink / raw)
To: akpm; +Cc: linux-input, apw, arjan, jkosina
On Wed, Mar 04, 2009 at 12:10:55PM -0800, akpm@linux-foundation.org wrote:
> From: Andy Whitcroft <apw@canonical.com>
>
> 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.
>
> This patch adds this reset by default providing a module option to
> restore the previous non-reset behaviour:
>
> psmouse.synaptics_resume_reset=N
>
> Also a message is emmitted on resume hinting as to how to fix a broken
> touchpad.
>
> [akpm@linux-foundation.org: make message more informative, fix 80-cols]
Andrew,
Please drop this one. I have committed a bit different version of the
same and it is now in mainline.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-05 6:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 20:10 [patch for 2.6.29? 3/3] psmouse/synaptics: ensure we reset the device on resume akpm
2009-03-05 6:31 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).