diff options
author | Ping Cheng <pinglinux@gmail.com> | 2013-12-05 15:54:53 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-12-16 05:12:32 -0500 |
commit | 961794a00eab03f4344b7d5e825e8e789e55da87 (patch) | |
tree | be8c0fc41751917397343ae5d7945578f590579a /drivers/input/tablet/wacom_sys.c | |
parent | 348324c5b10bcba8d9daabdfb85a6927311be34f (diff) |
Input: wacom - add reporting of SW_MUTE_DEVICE events
New Intuos series models added a hardware switch to turn touch
data on/off. The state of the switch is reported periodically
from the tablet. To report the state the driver will emit SW_MUTE_DEVICE
events.
Reviewed_by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 8318826d976e..b16ebef5b911 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -1197,6 +1197,8 @@ static void wacom_wireless_work(struct work_struct *work) | |||
1197 | wacom_wac1->features.device_type = BTN_TOOL_PEN; | 1197 | wacom_wac1->features.device_type = BTN_TOOL_PEN; |
1198 | snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen", | 1198 | snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen", |
1199 | wacom_wac1->features.name); | 1199 | wacom_wac1->features.name); |
1200 | wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max; | ||
1201 | wacom_wac1->shared->type = wacom_wac1->features.type; | ||
1200 | error = wacom_register_input(wacom1); | 1202 | error = wacom_register_input(wacom1); |
1201 | if (error) | 1203 | if (error) |
1202 | goto fail; | 1204 | goto fail; |
@@ -1218,6 +1220,10 @@ static void wacom_wireless_work(struct work_struct *work) | |||
1218 | error = wacom_register_input(wacom2); | 1220 | error = wacom_register_input(wacom2); |
1219 | if (error) | 1221 | if (error) |
1220 | goto fail; | 1222 | goto fail; |
1223 | |||
1224 | if (wacom_wac1->features.type == INTUOSHT && | ||
1225 | wacom_wac1->features.touch_max) | ||
1226 | wacom_wac->shared->touch_input = wacom_wac2->input; | ||
1221 | } | 1227 | } |
1222 | 1228 | ||
1223 | error = wacom_initialize_battery(wacom); | 1229 | error = wacom_initialize_battery(wacom); |
@@ -1396,6 +1402,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
1396 | goto fail5; | 1402 | goto fail5; |
1397 | } | 1403 | } |
1398 | } | 1404 | } |
1405 | |||
1406 | if (wacom_wac->features.type == INTUOSHT && wacom_wac->features.touch_max) { | ||
1407 | if (wacom_wac->features.device_type == BTN_TOOL_FINGER) | ||
1408 | wacom_wac->shared->touch_input = wacom_wac->input; | ||
1409 | } | ||
1410 | |||
1399 | return 0; | 1411 | return 0; |
1400 | 1412 | ||
1401 | fail5: wacom_destroy_leds(wacom); | 1413 | fail5: wacom_destroy_leds(wacom); |