summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorPrzemo Firszt <przemo@firszt.eu>2012-05-15 19:32:26 +0100
committerJiri Kosina <jkosina@suse.cz>2012-05-16 21:42:15 +0200
commitbe4925b018b3c398d2775826091c693f214630a8 (patch)
treef3b76c998ef5b22c730301df00ddc92e3593fc33 /drivers/hid
parent163a6ae19b8f6afc4ac4f60711b998a3c150b858 (diff)
downloadblackbird-op-linux-be4925b018b3c398d2775826091c693f214630a8.tar.gz
blackbird-op-linux-be4925b018b3c398d2775826091c693f214630a8.zip
HID: wacom: Add speed setting for Intuos4 WL
Add option to change reporting speed for Intuos4 WL. The option is only internal to the module, but it will be extended to allow control over sysfs, as it is already implemented for Graphire. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-wacom.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 4fc4eebe9784..5f6ce70c23fb 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -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;
}
@@ -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,
OpenPOWER on IntegriCloud