Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5823
b: refs/heads/master
c: dc1d97e
h: refs/heads/master
i:
  5821: a6631a8
  5819: 97aeec5
  5815: b5f1ad4
  5807: 10d7841
  5791: a70f423
  5759: 5803bb4
v: v3
  • Loading branch information
Ping Cheng authored and Linus Torvalds committed Aug 17, 2005
1 parent 6a06bff commit e134f1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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: 33a5c72432ef3e75dcf546bf41bcbfce697903ff
refs/heads/master: dc1d97e466c2836adebe5618759bfb5b35b3bc0a
21 changes: 10 additions & 11 deletions trunk/drivers/usb/input/wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,6 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
goto exit;
}

x = le16_to_cpu(*(__le16 *) &data[2]);
y = le16_to_cpu(*(__le16 *) &data[4]);

input_regs(dev, regs);

if (data[1] & 0x10) { /* in prox */
Expand Down Expand Up @@ -373,15 +370,17 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
}
}

if (data[1] & 0x80) {
if (data[1] & 0x90) {
x = le16_to_cpu(*(__le16 *) &data[2]);
y = le16_to_cpu(*(__le16 *) &data[4]);
input_report_abs(dev, ABS_X, x);
input_report_abs(dev, ABS_Y, y);
}
if (wacom->tool[0] != BTN_TOOL_MOUSE) {
input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6]));
input_report_key(dev, BTN_TOUCH, data[1] & 0x01);
input_report_key(dev, BTN_STYLUS, data[1] & 0x02);
input_report_key(dev, BTN_STYLUS2, data[1] & 0x04);
if (wacom->tool[0] != BTN_TOOL_MOUSE) {
input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6]));
input_report_key(dev, BTN_TOUCH, data[1] & 0x01);
input_report_key(dev, BTN_STYLUS, data[1] & 0x02);
input_report_key(dev, BTN_STYLUS2, data[1] & 0x04);
}
}

input_report_key(dev, wacom->tool[0], data[1] & 0x10);
Expand Down Expand Up @@ -568,7 +567,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs)

/* Cintiq doesn't send data when RDY bit isn't set */
if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40))
return;
goto exit;

if (wacom->features->type >= INTUOS3) {
input_report_abs(dev, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));
Expand Down

0 comments on commit e134f1e

Please sign in to comment.