Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144410
b: refs/heads/master
c: b2546df
h: refs/heads/master
v: v3
  • Loading branch information
Arjan Opmeer authored and Dmitry Torokhov committed Apr 19, 2009
1 parent 67f247c commit a0d25c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 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: 3f8c0df43dec51fbdfb2627f7574aa00a5fce98c
refs/heads/master: b2546df69b6bef19513112fd54ffb5d37cb3eb7a
21 changes: 16 additions & 5 deletions trunk/drivers/input/mouse/elantech.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,22 +375,33 @@ static int elantech_set_absolute_mode(struct psmouse *psmouse)
rc = -1;
break;
}
}

if (rc == 0) {
/*
* Read back reg 0x10. The touchpad is probably initalising
* and not ready until we read back the value we just wrote.
* Read back reg 0x10. For hardware version 1 we must make
* sure the absolute mode bit is set. For hardware version 2
* the touchpad is probably initalising and not ready until
* we read back the value we just wrote.
*/
do {
rc = elantech_read_reg(psmouse, 0x10, &val);
if (rc == 0)
break;
tries--;
elantech_debug("elantech.c: retrying read (%d).\n",
tries);
tries);
msleep(ETP_READ_BACK_DELAY);
} while (tries > 0);
if (rc)

if (rc) {
pr_err("elantech.c: failed to read back register 0x10.\n");
break;
} else if (etd->hw_version == 1 &&
!(val & ETP_R10_ABSOLUTE_MODE)) {
pr_err("elantech.c: touchpad refuses "
"to switch to absolute mode.\n");
rc = -1;
}
}

if (rc)
Expand Down

0 comments on commit a0d25c3

Please sign in to comment.