From patchwork Fri Aug 14 06:43:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 41353 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7E6hvWI031080 for ; Fri, 14 Aug 2009 06:43:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752323AbZHNGny (ORCPT ); Fri, 14 Aug 2009 02:43:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753968AbZHNGny (ORCPT ); Fri, 14 Aug 2009 02:43:54 -0400 Received: from rv-out-0506.google.com ([209.85.198.239]:62797 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbZHNGnx (ORCPT ); Fri, 14 Aug 2009 02:43:53 -0400 Received: by rv-out-0506.google.com with SMTP id f6so395921rvb.1 for ; Thu, 13 Aug 2009 23:43:54 -0700 (PDT) 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 :mime-version:content-type:content-disposition:user-agent:message-id; bh=w+GSoSFy9OLgt3meVJgOQiHex7DOVpCfq9DE5tCuYK8=; b=k0emqX2OLgCWQd1xHkK/we8naBINqkZ+UFB0z/QdhCCPj2HHBzXS7DObiPvimbss4C EhApZuXa+vkhdslkElRMVlVhW+EB0ANivJEVk3kRslsi4gc1fj4xkshv6QCTG1f/hj7+ tbId9SAzXJ83DJE5VCJJvOJIPKFbztAci2WTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:mime-version:content-type :content-disposition:user-agent:message-id; b=iJkuT/8KU0Q8zeAl46uKF9uJF59iTrR0ptjqa7SZU4vEY8S44oWWOPVEvO9DsB/LU+ bwlJ+jYcUG4C5bws5V5ssXs3Pt25Iu4wbU8rXaqPaUyD29KBXP3juYgIWvMaR+UJbDi+ 476fn/ss6QyQ4RCjsqctksPx7jPFQ0oq7idNQ= Received: by 10.140.139.4 with SMTP id m4mr446837rvd.233.1250232234393; Thu, 13 Aug 2009 23:43:54 -0700 (PDT) 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 c20sm5552476rvf.1.2009.08.13.23.43.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Aug 2009 23:43:53 -0700 (PDT) Date: Thu, 13 Aug 2009 23:43:49 -0700 From: Dmitry Torokhov To: Linux Input Cc: LKML Subject: [RFC] i8042 - bypass AUX IRQ delivery test on laptops MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Message-Id: <20090814071438.6C860526EC9@mailhub.coreip.homeip.net> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org It seems that many laptops do not fully implement AUX LOOP command in their keyboard controllers, causing issues with touchpad detection. Hovewer we know that almost every laptop/portable uses PS/2 pointing device and even if user disables it in favor of external mouse the system will not use IRQ 12 for anything else. Therefore we may bypass AUX IRQ delivery test when running on a laptop and assume that it is routed properly. Just to be safe we require the box to have good PNP data in order to bypass the test. Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042-x86ia64io.h | 34 +++++++++++++++++++++++++++++++++ drivers/input/serio/i8042.c | 4 +++- 2 files changed, 37 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index ae04d8a..6747b9d 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -449,6 +449,34 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { }, { } }; + +static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = { + { + .ident = "Portable", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ + }, + }, + { + .ident = "Laptop", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ + }, + }, + { + .ident = "Notebook", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ + }, + }, + { + .ident = "Sub-Notebook", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ + }, + }, + +}; #endif /* @@ -727,6 +755,12 @@ static int __init i8042_pnp_init(void) i8042_kbd_irq = i8042_pnp_kbd_irq; i8042_aux_irq = i8042_pnp_aux_irq; +#ifdef CONFIG_X86 + i8042_bypass_aux_irq_test = !i8042_noaux && + !pnp_data_busted && + dmi_check_system(i8042_dmi_laptop_table); +#endif + return 0; } diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9f5c050..b53a015 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -83,6 +83,8 @@ module_param_named(debug, i8042_debug, bool, 0600); MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off"); #endif +static bool i8042_bypass_aux_irq_test; + #include "i8042.h" static DEFINE_SPINLOCK(i8042_lock); @@ -641,7 +643,7 @@ static int __devinit i8042_check_aux(void) * used it for a PCI card or somethig else. */ - if (i8042_noloop || aux_loop_broken) { + if (i8042_noloop || i8042_bypass_aux_irq_test || aux_loop_broken) { /* * Without LOOP command we can't test AUX IRQ delivery. Assume the port * is working and hope we are right.