All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Ragwitz <rafl@debian.org>
To: linux-input@vger.kernel.org
Cc: Florian Ragwitz <rafl@debian.org>
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	[thread overview]
Message-ID: <1272141662-23431-3-git-send-email-rafl@debian.org> (raw)
In-Reply-To: <1272141662-23431-1-git-send-email-rafl@debian.org>

Apparently hardware vendors now ship elantech touchpads with different version
magic. This options allows for them to be tested easier with the current driver
in order to add their magic to the whitelist later.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
---
 drivers/input/mouse/elantech.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

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) {
-- 
1.7.0.5


  parent reply	other threads:[~2010-04-24 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 20:40 Getting recent elantech touchpads to work with synaptics Florian Ragwitz
2010-04-24 20:40 ` [PATCH 1/4] Input: elantech - Assume all firmware versions >= 2.48 use 6 byte packets Florian Ragwitz
2010-04-26 14:19   ` Getting recent elantech touchpads to work with synaptics Florian Ragwitz
2010-04-27  7:36     ` Dmitry Torokhov
2010-04-27 14:58       ` Florian Ragwitz
2010-04-27 14:58       ` [PATCH] Update elantech documentation Florian Ragwitz
2010-04-24 20:41 ` Florian Ragwitz [this message]
2010-04-24 20:41 ` [PATCH 3/4] Input: elantech - Ignore high bits in the position coordinates Florian Ragwitz
2010-04-24 20:41 ` [PATCH 4/4] Input: elantech - Whitelist new models with firmware version 4.1 Florian Ragwitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272141662-23431-3-git-send-email-rafl@debian.org \
    --to=rafl@debian.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.