From patchwork Thu Jul 28 14:31:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 1015852 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6SEXhiJ000807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 28 Jul 2011 14:34:03 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p6SEW1Fm028960; Thu, 28 Jul 2011 07:32:01 -0700 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p6SEVhm0028927 for ; Thu, 28 Jul 2011 07:31:48 -0700 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110728143142.VEGW3933.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Thu, 28 Jul 2011 15:31:42 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110728143142.YDIC25656.aamtaout04-winn.ispmail.ntl.com@zog.reactivated.net>; Thu, 28 Jul 2011 15:31:42 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id 002459D401C; Thu, 28 Jul 2011 15:31:39 +0100 (BST) From: Daniel Drake To: dtor@mail.ru To: dmitry.torokhov@gmail.com Message-Id: <20110728143140.002459D401C@zog.reactivated.net> Date: Thu, 28 Jul 2011 15:31:39 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=p1z7mq30HYcA:10 a=vJ1w_8FsMGIA:10 a=Op-mwl0xAAAA:8 a=Z1no5zgwp2naUOVtonsA:9 a=1P1xVnlN2viLiNSIThwA:7 a=d4CUUju0HPYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-4.536 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: linux-pm@lists.linux-foundation.org, dilinger@queued.net, linux-input@vger.kernel.org Subject: [linux-pm] [PATCH v3 2/2] i8042: Enable OLPC's EC-based i8042 wakeup control X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 28 Jul 2011 14:34:03 +0000 (UTC) The OLPC XO laptop can be resumed from suspend via keyboard or mouse activity. Hook up the i8042 driver to the OLPC EC controls to make this possible. Signed-off-by: Daniel Drake --- drivers/input/serio/i8042-x86ia64io.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) This depends on patches merged into linus master 2 days ago. diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 76b2e58..36f6015 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -9,6 +9,7 @@ #ifdef CONFIG_X86 #include +#include #endif /* @@ -877,6 +878,13 @@ static inline void i8042_pnp_exit(void) { } static inline void i8042_platform_suspend(struct device *dev, bool may_wakeup) { + if (!machine_is_olpc()) + return; + + if (may_wakeup) + olpc_ec_wakeup_set(EC_SCI_SRC_GAME); + else + olpc_ec_wakeup_clear(EC_SCI_SRC_GAME); } static int __init i8042_platform_init(void) @@ -923,6 +931,9 @@ static int __init i8042_platform_init(void) if (dmi_check_system(i8042_dmi_dritek_table)) i8042_dritek = true; + + if (olpc_ec_wakeup_available()) + i8042_enable_wakeup = true; #endif /* CONFIG_X86 */ return retval;