Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180858
b: refs/heads/master
c: 46a709b
h: refs/heads/master
v: v3
  • Loading branch information
Bastien Nocera authored and Jiri Kosina committed Feb 3, 2010
1 parent cf0e3ba commit 3a20ace
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4bfa033ed84e0ae446eff445d107ffd5ee78df3
refs/heads/master: 46a709b900bfcf43244cd19cf3245c77484ec733
27 changes: 27 additions & 0 deletions trunk/drivers/hid/hid-wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ static int wacom_probe(struct hid_device *hdev,
struct hid_input *hidinput;
struct input_dev *input;
struct wacom_data *wdata;
char rep_data[2];
int ret;
int limit;

wdata = kzalloc(sizeof(*wdata), GFP_KERNEL);
if (wdata == NULL) {
Expand All @@ -166,6 +168,7 @@ static int wacom_probe(struct hid_device *hdev,

hid_set_drvdata(hdev, wdata);

/* Parse the HID report now */
ret = hid_parse(hdev);
if (ret) {
dev_err(&hdev->dev, "parse failed\n");
Expand All @@ -178,6 +181,30 @@ static int wacom_probe(struct hid_device *hdev,
goto err_free;
}

/* Set Wacom mode2 */
rep_data[0] = 0x03; rep_data[1] = 0x00;
limit = 3;
do {
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
HID_FEATURE_REPORT);
} while (ret < 0 && limit-- > 0);
if (ret < 0) {
dev_err(&hdev->dev, "failed to poke device #1, %d\n", ret);
goto err_free;
}

/* 0x06 - high reporting speed, 0x05 - low speed */
rep_data[0] = 0x06; rep_data[1] = 0x00;
limit = 3;
do {
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
HID_FEATURE_REPORT);
} while (ret < 0 && limit-- > 0);
if (ret < 0) {
dev_err(&hdev->dev, "failed to poke device #2, %d\n", ret);
goto err_free;
}

hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
input = hidinput->input;

Expand Down

0 comments on commit 3a20ace

Please sign in to comment.