From patchwork Mon Dec 21 07:09:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 69084 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBL79wEj000545 for ; Mon, 21 Dec 2009 07:09:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbZLUHJ5 (ORCPT ); Mon, 21 Dec 2009 02:09:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750991AbZLUHJ5 (ORCPT ); Mon, 21 Dec 2009 02:09:57 -0500 Received: from mail-px0-f189.google.com ([209.85.216.189]:45485 "EHLO mail-px0-f189.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbZLUHJ5 (ORCPT ); Mon, 21 Dec 2009 02:09:57 -0500 Received: by pxi27 with SMTP id 27so1731135pxi.4 for ; Sun, 20 Dec 2009 23:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=arWsNOzg0gb2nkR71hDZsiH3RE28194HlA5tYoOpU3A=; b=P6oxiWETbR5ouMjUI5v8pH0HjeDqwbG7a0JVW1YJfAr6CVi4ol3mKZfqFXhrtHDhxT vdKsW0kJTvf8T/CyOCBZRU5aVACN9rqCCpvQBhmNzZX6UbAcoUSw2JmydbaQsp3H34u3 /sq7f/d84KY9bmakah7vyVo5m0P+G9/uznJHs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=Te8H39t+pYvurHyR4KMkUl7TVu7yBr8aYdujChSPRKIkqwJ7wesINzySeO3pcPs8it 8R/Wxp9q27GBHZsKwGfnu4a+gpqNOH0LIFAKdU+akzE5dUpstuhTlW1sjRuw+/QaTpNL lzxicXAgnTpH/ifLnYj3RQq2E3Cd4j0Z7Sefg= Received: by 10.142.61.41 with SMTP id j41mr4405454wfa.298.1261379396224; Sun, 20 Dec 2009 23:09:56 -0800 (PST) Received: from mailhub.coreip.homeip.net (c-24-6-153-137.hsd1.ca.comcast.net [24.6.153.137]) by mx.google.com with ESMTPS id 21sm5019681pzk.11.2009.12.20.23.09.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 20 Dec 2009 23:09:55 -0800 (PST) Date: Sun, 20 Dec 2009 23:09:52 -0800 From: Dmitry Torokhov To: Linux Input Cc: linux-pm@lists.linux-foundation.org, LKML , "Rafael J. Wysocki" Subject: [RFT] Input: speed up suspend/shutdown for PS/2 mice and keyboards Message-ID: <20091221070951.GA4170@core.coreip.homeip.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index a357357..1f5e2ce 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -134,7 +134,8 @@ static const unsigned short atkbd_unxlate_table[128] = { #define ATKBD_CMD_GETID 0x02f2 #define ATKBD_CMD_SETREP 0x10f3 #define ATKBD_CMD_ENABLE 0x00f4 -#define ATKBD_CMD_RESET_DIS 0x00f5 +#define ATKBD_CMD_RESET_DIS 0x00f5 /* Reset to defaults and disable */ +#define ATKBD_CMD_RESET_DEF 0x00f6 /* Reset to defaults */ #define ATKBD_CMD_SETALL_MBR 0x00fa #define ATKBD_CMD_RESET_BAT 0x02ff #define ATKBD_CMD_RESEND 0x00fe @@ -836,7 +837,7 @@ static void atkbd_cleanup(struct serio *serio) struct atkbd *atkbd = serio_get_drvdata(serio); atkbd_disable(atkbd); - ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); + ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_DEF); } diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index fd0bc09..401ac6b 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1137,7 +1137,10 @@ static void psmouse_cleanup(struct serio *serio) if (psmouse->cleanup) psmouse->cleanup(psmouse); - psmouse_reset(psmouse); +/* + * Reset the mouse to defaults (bare PS/2 protocol). + */ + ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); /* * Some boxes, such as HP nx7400, get terribly confused if mouse