[PATCH 4/4] Input: elantech - Whitelist new models with firmware version 4.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The check is intentionally quite strict. It will probably need to be relaxed
later, but given how easy it is to test a non-whitelisted firmware with
force_elantech, that's OK.

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

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 254a967..70321b7 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -599,7 +599,8 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
 	pr_debug("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n",
 		 param[0], param[1], param[2]);
 
-	if (param[0] == 0 || param[1] != 0) {
+	if ((param[0] == 0 || param[1] != 0) &&
+	    (param[0] != 4 && param[1] != 1 && param[2] != 1)) {
 		if (!force_elantech) {
 			pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
 			return -1;
-- 
1.7.0.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux