From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: + psmouse-synaptics-ensure-we-reset-the-device-on-resume.patch added to -mm tree Date: Fri, 13 Feb 2009 13:15:35 -0800 Message-ID: <200902132115.n1DLFa3P011993@imap1.linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:55963 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760340AbZBMVQD (ORCPT ); Fri, 13 Feb 2009 16:16:03 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org Cc: apw@canonical.com, arjan@infradead.org, dtor@mail.ru, jkosina@suse.cz The patch titled psmouse/synaptics: ensure we reset the device on resume has been added to the -mm tree. Its filename is psmouse-synaptics-ensure-we-reset-the-device-on-resume.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: psmouse/synaptics: ensure we reset the device on resume From: Andy Whitcroft 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. Signed-off-by: Andy Whitcroft Cc: Jiri Kosina Cc: Dmitry Torokhov Cc: Arjan van de Ven Signed-off-by: Andrew Morton --- drivers/input/mouse/synaptics.c | 10 ++++++++++ 1 file changed, 10 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,21 @@ 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, see synaptics_resume_reset if you have trouble on resume\n"); + psmouse_reset(psmouse); + } + param[0] = 0; ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); _ Patches currently in -mm which might be from apw@canonical.com are origin.patch mmc-add-modalias-linkage-for-mmc-sd-devices.patch psmouse-synaptics-ensure-we-reset-the-device-on-resume.patch psmouse-synaptics-ensure-we-reset-the-device-on-resume-fix.patch checkpatch-make-in_atomic-ok-in-the-core.patch checkpatch-do-not-warn-about-p0-patches-when-checking-files.patch checkpatch-correctly-handle-type-spacing-in-the-face-of-modifiers.patch checkpatch-pointer-type-star-may-have-modifiers-following.patch checkpatch-a-modifier-is-not-an-identifier-at-the-end-of-a-type.patch checkpatch-extend-attribute-testing-to-all-modifiers.patch checkpatch-add-__ref-as-a-sparse-modifier.patch checkpatch-version-028.patch