summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-08-06 22:55:56 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-08-07 00:14:34 +0200
commit81af7e61a774e687ed4a7f37992ef75da57c5ddf (patch)
tree6cb88940d854b69455876f0185105a91f130fac3 /drivers/hid/wacom_sys.c
parentInput: wacom - handle Graphire BT tablets in wacom.ko (diff)
downloadlinux-81af7e61a774e687ed4a7f37992ef75da57c5ddf.tar.xz
linux-81af7e61a774e687ed4a7f37992ef75da57c5ddf.zip
Input: wacom - handle Intuos 4 BT in wacom.ko
A good point of this change is that now, the Intuos4 bluetooth can handle the different tools (artpen, airbrush, mice), and we get a common interface between USB and BT for accessing the LEDs/OLEDs. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index c21e58ba0693..f5c9c56c0975 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -296,6 +296,20 @@ static int wacom_bt_query_tablet_data(struct hid_device *hdev, u8 speed,
hid_warn(hdev, "failed to poke device, command %d, err %d\n",
rep_data[0], ret);
break;
+ case INTUOS4WL:
+ if (speed == 1)
+ wacom->wacom_wac.bt_features &= ~0x20;
+ else
+ wacom->wacom_wac.bt_features |= 0x20;
+
+ rep_data[0] = 0x03;
+ rep_data[1] = wacom->wacom_wac.bt_features;
+
+ ret = wacom_set_report(hdev, HID_FEATURE_REPORT,
+ rep_data[0], rep_data, 2, 1);
+ if (ret >= 0)
+ wacom->wacom_wac.bt_high_speed = speed;
+ break;
}
return 0;
@@ -720,6 +734,7 @@ static int wacom_initialize_leds(struct wacom *wacom)
switch (wacom->wacom_wac.features.type) {
case INTUOS4S:
case INTUOS4:
+ case INTUOS4WL:
case INTUOS4L:
wacom->led.select[0] = 0;
wacom->led.select[1] = 0;
@@ -786,6 +801,7 @@ static void wacom_destroy_leds(struct wacom *wacom)
switch (wacom->wacom_wac.features.type) {
case INTUOS4S:
case INTUOS4:
+ case INTUOS4WL:
case INTUOS4L:
sysfs_remove_group(&wacom->hdev->dev.kobj,
&intuos4_led_attr_group);