rpms/kernel/F-13 input-synaptics-relax-capability-id-checks-on-new-hardware.patch, NONE, 1.1 kernel.spec, 1.2111, 1.2112

Chuck Ebbert cebbert at fedoraproject.org
Thu Jul 22 21:34:43 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv32765

Modified Files:
	kernel.spec 
Added Files:
	input-synaptics-relax-capability-id-checks-on-new-hardware.patch 
Log Message:
input-synaptics-relax-capability-id-checks-on-new-hardware.patch:
  Make mouse driver recognize newer synaptics hardware as touchpad.

input-synaptics-relax-capability-id-checks-on-new-hardware.patch:
 synaptics.c |    7 ++++++-
 synaptics.h |    3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- NEW FILE input-synaptics-relax-capability-id-checks-on-new-hardware.patch ---
From: Dmitry Torokhov <dmitry.torokhov at gmail.com>
Date: Wed, 21 Jul 2010 07:01:19 +0000 (-0700)
Subject: Input: synaptics - relax capability ID checks on newer hardware
X-Git-Tag: v2.6.35-rc6~1^2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=3619b8fead04ab9de643712e757ef6b5f79fd1ab

Input: synaptics - relax capability ID checks on newer hardware

Older firmwares fixed the middle byte of the Synaptics capabilities
query to 0x47, but starting with firmware 7.5 the middle byte
represents submodel ID, sometimes also called "dash number".

Reported-and-tested-by: Miroslav Šulc <fordfrog at gmail.com>
Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
---

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 9ba9c4a..705589d 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse)
 	priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];
 	priv->ext_cap = priv->ext_cap_0c = 0;
 
-	if (!SYN_CAP_VALID(priv->capabilities))
+	/*
+	 * Older firmwares had submodel ID fixed to 0x47
+	 */
+	if (SYN_ID_FULL(priv->identity) < 0x705 &&
+	    SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {
 		return -1;
+	}
 
 	/*
 	 * Unless capExtended is set the rest of the flags should be ignored
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 7d4d5e1..b6aa7d2 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -47,7 +47,7 @@
 #define SYN_CAP_FOUR_BUTTON(c)		((c) & (1 << 3))
 #define SYN_CAP_MULTIFINGER(c)		((c) & (1 << 1))
 #define SYN_CAP_PALMDETECT(c)		((c) & (1 << 0))
-#define SYN_CAP_VALID(c)		((((c) & 0x00ff00) >> 8) == 0x47)
+#define SYN_CAP_SUBMODEL_ID(c)		(((c) & 0x00ff00) >> 8)
 #define SYN_EXT_CAP_REQUESTS(c)		(((c) & 0x700000) >> 20)
 #define SYN_CAP_MULTI_BUTTON_NO(ec)	(((ec) & 0x00f000) >> 12)
 #define SYN_CAP_PRODUCT_ID(ec)		(((ec) & 0xff0000) >> 16)
@@ -66,6 +66,7 @@
 #define SYN_ID_MODEL(i)			(((i) >> 4) & 0x0f)
 #define SYN_ID_MAJOR(i)			((i) & 0x0f)
 #define SYN_ID_MINOR(i)			(((i) >> 16) & 0xff)
+#define SYN_ID_FULL(i)			((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i))
 #define SYN_ID_IS_SYNAPTICS(i)		((((i) >> 8) & 0xff) == 0x47)
 
 /* synaptics special commands */


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2111
retrieving revision 1.2112
diff -u -p -r1.2111 -r1.2112
--- kernel.spec	22 Jul 2010 19:19:36 -0000	1.2111
+++ kernel.spec	22 Jul 2010 21:34:43 -0000	1.2112
@@ -789,6 +789,8 @@ Patch12350: acpica-06-linux-2.6.git-9d3c
 # fix system powering back on after shutdown (#613239)
 Patch12360: acpi-pm-do-not-enable-gpes-for-system-wakeup-in-advance.patch
 
+Patch12400: input-synaptics-relax-capability-id-checks-on-new-hardware.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1463,6 +1465,9 @@ ApplyPatch acpica-06-linux-2.6.git-9d3c7
 # fix system powering back on after shutdown (#613239)
 ApplyPatch acpi-pm-do-not-enable-gpes-for-system-wakeup-in-advance.patch
 
+# fix newer synaptics touchpads not being recognized
+ApplyPatch input-synaptics-relax-capability-id-checks-on-new-hardware.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2082,6 +2087,10 @@ fi
 
 
 %changelog
+* Thu Jul 22 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-28
+- input-synaptics-relax-capability-id-checks-on-new-hardware.patch:
+  Make mouse driver recognize newer synaptics hardware as touchpad.
+
 * Thu Jul 22 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-27
 - ACPI GPE enable/disable patches: fix system powering back on
   after shutdown (#613239) (and possibly #615858)



More information about the scm-commits mailing list