From patchwork Sat Apr 24 20:41:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Ragwitz X-Patchwork-Id: 94863 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3OLO7Lo018554 for ; Sat, 24 Apr 2010 21:26:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360Ab0DXV0m (ORCPT ); Sat, 24 Apr 2010 17:26:42 -0400 Received: from weedy.perldition.org ([85.10.210.75]:54455 "EHLO weedy.perldition.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239Ab0DXV0l (ORCPT ); Sat, 24 Apr 2010 17:26:41 -0400 Received: from p4fd764a8.dip.t-dialin.net ([79.215.100.168]:33230 helo=tardis.perldition.org) by weedy.perldition.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1O5mAi-0008V5-VY; Sat, 24 Apr 2010 22:41:53 +0200 Received: from rafl by tardis.perldition.org with local (Exim 4.71) (envelope-from ) id 1O5mA4-00069X-OB; Sat, 24 Apr 2010 22:41:12 +0200 From: Florian Ragwitz To: linux-input@vger.kernel.org Cc: Florian Ragwitz Subject: [PATCH 2/4] Input: Add an option to force the use of the elantech extension Date: Sat, 24 Apr 2010 22:41:00 +0200 Message-Id: <1272141662-23431-3-git-send-email-rafl@debian.org> X-Mailer: git-send-email 1.7.0.5 In-Reply-To: <1272141662-23431-1-git-send-email-rafl@debian.org> References: <1272141662-23431-1-git-send-email-rafl@debian.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 24 Apr 2010 21:26:43 +0000 (UTC) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 07f6b17..bfd08c7 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -25,6 +25,10 @@ printk(KERN_DEBUG format, ##arg); \ } while (0) +static unsigned int force_elantech; +module_param_named(force_elantech, force_elantech, bool, 0644); +MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default)."); + /* * Send a Synaptics style sliced query command */ @@ -596,8 +600,12 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties) param[0], param[1], param[2]); if (param[0] == 0 || param[1] != 0) { - pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); - return -1; + if (!force_elantech) { + pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); + return -1; + } + + pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n"); } if (set_properties) {