Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305071
b: refs/heads/master
c: be4925b
h: refs/heads/master
i:
  305069: 64f34ac
  305067: cd7aab2
  305063: 6791b71
  305055: e185a18
v: v3
  • Loading branch information
Przemo Firszt authored and Jiri Kosina committed May 16, 2012
1 parent 904e723 commit 1134baf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: 163a6ae19b8f6afc4ac4f60711b998a3c150b858
refs/heads/master: be4925b018b3c398d2775826091c693f214630a8
17 changes: 13 additions & 4 deletions trunk/drivers/hid/hid-wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,25 @@ static int wacom_ac_get_property(struct power_supply *psy,
return ret;
}

static void wacom_set_features(struct hid_device *hdev)
static void wacom_set_features(struct hid_device *hdev, u8 speed)
{
struct wacom_data *wdata = hid_get_drvdata(hdev);
int ret;
__u8 rep_data[2];

/*set high speed, tablet mode*/
if (speed == 1)
wdata->features &= ~0x20;
else
wdata->features |= 0x20;

rep_data[0] = 0x03;
rep_data[1] = 0x20;
rep_data[1] = wdata->features;

ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
HID_FEATURE_REPORT);
if (ret >= 0)
wdata->high_speed = speed;

return;
}

Expand Down Expand Up @@ -719,7 +728,7 @@ static int wacom_probe(struct hid_device *hdev,
case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
sprintf(hdev->name, "%s", "Wacom Intuos4 WL");
wdata->features = 0;
wacom_set_features(hdev);
wacom_set_features(hdev, 1);
ret = wacom_initialize_leds(hdev);
if (ret) {
hid_warn(hdev,
Expand Down

0 comments on commit 1134baf

Please sign in to comment.