Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201175
b: refs/heads/master
c: 3619b8f
h: refs/heads/master
i:
  201173: a0a60d2
  201171: 7a9b58e
  201167: 036cd5c
v: v3
  • Loading branch information
Dmitry Torokhov committed Jul 22, 2010
1 parent d4a925a commit 1e27107
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fea60261e73dbf4a51130d40cafcc8465b0f2c3
refs/heads/master: 3619b8fead04ab9de643712e757ef6b5f79fd1ab
7 changes: 6 additions & 1 deletion trunk/drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/input/mouse/synaptics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 */
Expand Down

0 comments on commit 1e27107

Please sign in to comment.