Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208097
b: refs/heads/master
c: 7f29f17
h: refs/heads/master
i:
  208095: 9e6aaea
v: v3
  • Loading branch information
Éric Piel authored and Dmitry Torokhov committed Aug 6, 2010
1 parent dbb2ecb commit 5a6ee87
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 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: 7be3c13425ddeed8427cfaad65c9123c2c8ca331
refs/heads/master: 7f29f17b57255b6395046805a98bc663ded63fb8
21 changes: 10 additions & 11 deletions trunk/drivers/input/mouse/elantech.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse)
struct elantech_data *etd = psmouse->private;
unsigned char *packet = psmouse->packet;
int fingers;
static int old_fingers;

if (etd->fw_version < 0x020000) {
/*
Expand All @@ -203,10 +202,13 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse)
}

if (etd->jumpy_cursor) {
/* Discard packets that are likely to have bogus coordinates */
if (fingers > old_fingers) {
if (fingers != 1) {
etd->single_finger_reports = 0;
} else if (etd->single_finger_reports < 2) {
/* Discard first 2 reports of one finger, bogus */
etd->single_finger_reports++;
elantech_debug("discarding packet\n");
goto discard_packet_v1;
return;
}
}

Expand Down Expand Up @@ -238,9 +240,6 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse)
}

input_sync(dev);

discard_packet_v1:
old_fingers = fingers;
}

/*
Expand Down Expand Up @@ -733,13 +732,13 @@ int elantech_init(struct psmouse *psmouse)
etd->capabilities = param[0];

/*
* This firmware seems to suffer from misreporting coordinates when
* This firmware suffers from misreporting coordinates when
* a touch action starts causing the mouse cursor or scrolled page
* to jump. Enable a workaround.
*/
if (etd->fw_version == 0x020022) {
pr_info("firmware version 2.0.34 detected, enabling jumpy cursor workaround\n");
etd->jumpy_cursor = 1;
if (etd->fw_version == 0x020022 || etd->fw_version == 0x020600) {
pr_info("firmware version 2.0.34/2.6.0 detected, enabling jumpy cursor workaround\n");
etd->jumpy_cursor = true;
}

if (elantech_set_absolute_mode(psmouse)) {
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/input/mouse/elantech.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ struct elantech_data {
unsigned char reg_26;
unsigned char debug;
unsigned char capabilities;
unsigned char paritycheck;
unsigned char jumpy_cursor;
bool paritycheck;
bool jumpy_cursor;
unsigned char hw_version;
unsigned int fw_version;
unsigned int fw_version;
unsigned int single_finger_reports;
unsigned char parity[256];
};

Expand Down

0 comments on commit 5a6ee87

Please sign in to comment.