diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-19 20:02:01 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-19 20:02:01 -0400 |
commit | 10ce3cc919f50c2043b41ca968b43c26a3672600 (patch) | |
tree | ea409366a5208aced495bc0516a08b81fd43222e /drivers/input/tablet | |
parent | 24e3e5ae1e4c2a3a32f5b1f96b4e3fd721806acd (diff) | |
parent | 5c6a7a62c130afef3d61c1dee153012231ff5cd9 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r-- | drivers/input/tablet/acecad.c | 17 | ||||
-rw-r--r-- | drivers/input/tablet/aiptek.c | 19 | ||||
-rw-r--r-- | drivers/input/tablet/gtco.c | 28 | ||||
-rw-r--r-- | drivers/input/tablet/hanwang.c | 13 | ||||
-rw-r--r-- | drivers/input/tablet/kbtab.c | 20 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 25 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 28 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 2 |
8 files changed, 29 insertions, 123 deletions
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index d94f7e9aa997..f8b0b1df9138 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c | |||
@@ -269,19 +269,4 @@ static struct usb_driver usb_acecad_driver = { | |||
269 | .id_table = usb_acecad_id_table, | 269 | .id_table = usb_acecad_id_table, |
270 | }; | 270 | }; |
271 | 271 | ||
272 | static int __init usb_acecad_init(void) | 272 | module_usb_driver(usb_acecad_driver); |
273 | { | ||
274 | int result = usb_register(&usb_acecad_driver); | ||
275 | if (result == 0) | ||
276 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
277 | DRIVER_DESC "\n"); | ||
278 | return result; | ||
279 | } | ||
280 | |||
281 | static void __exit usb_acecad_exit(void) | ||
282 | { | ||
283 | usb_deregister(&usb_acecad_driver); | ||
284 | } | ||
285 | |||
286 | module_init(usb_acecad_init); | ||
287 | module_exit(usb_acecad_exit); | ||
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 85bace2c8fe8..205d16aab441 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c | |||
@@ -1923,21 +1923,7 @@ static struct usb_driver aiptek_driver = { | |||
1923 | .id_table = aiptek_ids, | 1923 | .id_table = aiptek_ids, |
1924 | }; | 1924 | }; |
1925 | 1925 | ||
1926 | static int __init aiptek_init(void) | 1926 | module_usb_driver(aiptek_driver); |
1927 | { | ||
1928 | int result = usb_register(&aiptek_driver); | ||
1929 | if (result == 0) { | ||
1930 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
1931 | DRIVER_DESC "\n"); | ||
1932 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_AUTHOR "\n"); | ||
1933 | } | ||
1934 | return result; | ||
1935 | } | ||
1936 | |||
1937 | static void __exit aiptek_exit(void) | ||
1938 | { | ||
1939 | usb_deregister(&aiptek_driver); | ||
1940 | } | ||
1941 | 1927 | ||
1942 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1928 | MODULE_AUTHOR(DRIVER_AUTHOR); |
1943 | MODULE_DESCRIPTION(DRIVER_DESC); | 1929 | MODULE_DESCRIPTION(DRIVER_DESC); |
@@ -1947,6 +1933,3 @@ module_param(programmableDelay, int, 0); | |||
1947 | MODULE_PARM_DESC(programmableDelay, "delay used during tablet programming"); | 1933 | MODULE_PARM_DESC(programmableDelay, "delay used during tablet programming"); |
1948 | module_param(jitterDelay, int, 0); | 1934 | module_param(jitterDelay, int, 0); |
1949 | MODULE_PARM_DESC(jitterDelay, "stylus/mouse settlement delay"); | 1935 | MODULE_PARM_DESC(jitterDelay, "stylus/mouse settlement delay"); |
1950 | |||
1951 | module_init(aiptek_init); | ||
1952 | module_exit(aiptek_exit); | ||
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 8ea6afe2e992..89a297801dce 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -1022,33 +1022,7 @@ static struct usb_driver gtco_driverinfo_table = { | |||
1022 | .disconnect = gtco_disconnect, | 1022 | .disconnect = gtco_disconnect, |
1023 | }; | 1023 | }; |
1024 | 1024 | ||
1025 | /* | 1025 | module_usb_driver(gtco_driverinfo_table); |
1026 | * Register this module with the USB subsystem | ||
1027 | */ | ||
1028 | static int __init gtco_init(void) | ||
1029 | { | ||
1030 | int error; | ||
1031 | |||
1032 | error = usb_register(>co_driverinfo_table); | ||
1033 | if (error) { | ||
1034 | err("usb_register() failed rc=0x%x", error); | ||
1035 | return error; | ||
1036 | } | ||
1037 | |||
1038 | printk("GTCO usb driver version: %s", GTCO_VERSION); | ||
1039 | return 0; | ||
1040 | } | ||
1041 | |||
1042 | /* | ||
1043 | * Deregister this module with the USB subsystem | ||
1044 | */ | ||
1045 | static void __exit gtco_exit(void) | ||
1046 | { | ||
1047 | usb_deregister(>co_driverinfo_table); | ||
1048 | } | ||
1049 | |||
1050 | module_init(gtco_init); | ||
1051 | module_exit(gtco_exit); | ||
1052 | 1026 | ||
1053 | MODULE_DESCRIPTION("GTCO digitizer USB driver"); | 1027 | MODULE_DESCRIPTION("GTCO digitizer USB driver"); |
1054 | MODULE_LICENSE("GPL"); | 1028 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c index 6504b627b234..b2db3cfe3084 100644 --- a/drivers/input/tablet/hanwang.c +++ b/drivers/input/tablet/hanwang.c | |||
@@ -432,15 +432,4 @@ static struct usb_driver hanwang_driver = { | |||
432 | .id_table = hanwang_ids, | 432 | .id_table = hanwang_ids, |
433 | }; | 433 | }; |
434 | 434 | ||
435 | static int __init hanwang_init(void) | 435 | module_usb_driver(hanwang_driver); |
436 | { | ||
437 | return usb_register(&hanwang_driver); | ||
438 | } | ||
439 | |||
440 | static void __exit hanwang_exit(void) | ||
441 | { | ||
442 | usb_deregister(&hanwang_driver); | ||
443 | } | ||
444 | |||
445 | module_init(hanwang_init); | ||
446 | module_exit(hanwang_exit); | ||
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 290f4e57b589..85a5b40333ac 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c | |||
@@ -198,22 +198,4 @@ static struct usb_driver kbtab_driver = { | |||
198 | .id_table = kbtab_ids, | 198 | .id_table = kbtab_ids, |
199 | }; | 199 | }; |
200 | 200 | ||
201 | static int __init kbtab_init(void) | 201 | module_usb_driver(kbtab_driver); |
202 | { | ||
203 | int retval; | ||
204 | retval = usb_register(&kbtab_driver); | ||
205 | if (retval) | ||
206 | goto out; | ||
207 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
208 | DRIVER_DESC "\n"); | ||
209 | out: | ||
210 | return retval; | ||
211 | } | ||
212 | |||
213 | static void __exit kbtab_exit(void) | ||
214 | { | ||
215 | usb_deregister(&kbtab_driver); | ||
216 | } | ||
217 | |||
218 | module_init(kbtab_init); | ||
219 | module_exit(kbtab_exit); | ||
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index b59058998417..ca28066dc81e 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -176,7 +176,7 @@ static int wacom_parse_logical_collection(unsigned char *report, | |||
176 | 176 | ||
177 | /* Logical collection is only used by 3rd gen Bamboo Touch */ | 177 | /* Logical collection is only used by 3rd gen Bamboo Touch */ |
178 | features->pktlen = WACOM_PKGLEN_BBTOUCH3; | 178 | features->pktlen = WACOM_PKGLEN_BBTOUCH3; |
179 | features->device_type = BTN_TOOL_DOUBLETAP; | 179 | features->device_type = BTN_TOOL_FINGER; |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * Stylus and Touch have same active area | 182 | * Stylus and Touch have same active area |
@@ -286,12 +286,10 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
286 | if (features->type == TABLETPC2FG) { | 286 | if (features->type == TABLETPC2FG) { |
287 | /* need to reset back */ | 287 | /* need to reset back */ |
288 | features->pktlen = WACOM_PKGLEN_TPC2FG; | 288 | features->pktlen = WACOM_PKGLEN_TPC2FG; |
289 | features->device_type = BTN_TOOL_DOUBLETAP; | ||
290 | } | 289 | } |
291 | if (features->type == BAMBOO_PT) { | 290 | if (features->type == BAMBOO_PT) { |
292 | /* need to reset back */ | 291 | /* need to reset back */ |
293 | features->pktlen = WACOM_PKGLEN_BBTOUCH; | 292 | features->pktlen = WACOM_PKGLEN_BBTOUCH; |
294 | features->device_type = BTN_TOOL_DOUBLETAP; | ||
295 | features->x_phy = | 293 | features->x_phy = |
296 | get_unaligned_le16(&report[i + 5]); | 294 | get_unaligned_le16(&report[i + 5]); |
297 | features->x_max = | 295 | features->x_max = |
@@ -325,7 +323,6 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
325 | if (features->type == TABLETPC2FG) { | 323 | if (features->type == TABLETPC2FG) { |
326 | /* need to reset back */ | 324 | /* need to reset back */ |
327 | features->pktlen = WACOM_PKGLEN_TPC2FG; | 325 | features->pktlen = WACOM_PKGLEN_TPC2FG; |
328 | features->device_type = BTN_TOOL_DOUBLETAP; | ||
329 | features->y_max = | 326 | features->y_max = |
330 | get_unaligned_le16(&report[i + 3]); | 327 | get_unaligned_le16(&report[i + 3]); |
331 | features->y_phy = | 328 | features->y_phy = |
@@ -334,7 +331,6 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
334 | } else if (features->type == BAMBOO_PT) { | 331 | } else if (features->type == BAMBOO_PT) { |
335 | /* need to reset back */ | 332 | /* need to reset back */ |
336 | features->pktlen = WACOM_PKGLEN_BBTOUCH; | 333 | features->pktlen = WACOM_PKGLEN_BBTOUCH; |
337 | features->device_type = BTN_TOOL_DOUBLETAP; | ||
338 | features->y_phy = | 334 | features->y_phy = |
339 | get_unaligned_le16(&report[i + 3]); | 335 | get_unaligned_le16(&report[i + 3]); |
340 | features->y_max = | 336 | features->y_max = |
@@ -1000,21 +996,4 @@ static struct usb_driver wacom_driver = { | |||
1000 | .supports_autosuspend = 1, | 996 | .supports_autosuspend = 1, |
1001 | }; | 997 | }; |
1002 | 998 | ||
1003 | static int __init wacom_init(void) | 999 | module_usb_driver(wacom_driver); |
1004 | { | ||
1005 | int result; | ||
1006 | |||
1007 | result = usb_register(&wacom_driver); | ||
1008 | if (result == 0) | ||
1009 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
1010 | DRIVER_DESC "\n"); | ||
1011 | return result; | ||
1012 | } | ||
1013 | |||
1014 | static void __exit wacom_exit(void) | ||
1015 | { | ||
1016 | usb_deregister(&wacom_driver); | ||
1017 | } | ||
1018 | |||
1019 | module_init(wacom_init); | ||
1020 | module_exit(wacom_exit); | ||
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index cd3ed29e0801..89a96427faa0 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -832,12 +832,24 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) | |||
832 | 832 | ||
833 | dbg("wacom_tpc_irq: received report #%d", data[0]); | 833 | dbg("wacom_tpc_irq: received report #%d", data[0]); |
834 | 834 | ||
835 | if (len == WACOM_PKGLEN_TPC1FG || data[0] == WACOM_REPORT_TPC1FG) | 835 | switch (len) { |
836 | return wacom_tpc_single_touch(wacom, len); | 836 | case WACOM_PKGLEN_TPC1FG: |
837 | else if (data[0] == WACOM_REPORT_TPC2FG) | 837 | return wacom_tpc_single_touch(wacom, len); |
838 | return wacom_tpc_mt_touch(wacom); | 838 | |
839 | else if (data[0] == WACOM_REPORT_PENABLED) | 839 | case WACOM_PKGLEN_TPC2FG: |
840 | return wacom_tpc_pen(wacom); | 840 | return wacom_tpc_mt_touch(wacom); |
841 | |||
842 | default: | ||
843 | switch (data[0]) { | ||
844 | case WACOM_REPORT_TPC1FG: | ||
845 | case WACOM_REPORT_TPCHID: | ||
846 | case WACOM_REPORT_TPCST: | ||
847 | return wacom_tpc_single_touch(wacom, len); | ||
848 | |||
849 | case WACOM_REPORT_PENABLED: | ||
850 | return wacom_tpc_pen(wacom); | ||
851 | } | ||
852 | } | ||
841 | 853 | ||
842 | return 0; | 854 | return 0; |
843 | } | 855 | } |
@@ -1317,7 +1329,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1317 | break; | 1329 | break; |
1318 | 1330 | ||
1319 | case TABLETPC2FG: | 1331 | case TABLETPC2FG: |
1320 | if (features->device_type == BTN_TOOL_DOUBLETAP) { | 1332 | if (features->device_type == BTN_TOOL_FINGER) { |
1321 | 1333 | ||
1322 | input_mt_init_slots(input_dev, 2); | 1334 | input_mt_init_slots(input_dev, 2); |
1323 | input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE, | 1335 | input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE, |
@@ -1366,7 +1378,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1366 | 1378 | ||
1367 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); | 1379 | __set_bit(INPUT_PROP_POINTER, input_dev->propbit); |
1368 | 1380 | ||
1369 | if (features->device_type == BTN_TOOL_DOUBLETAP) { | 1381 | if (features->device_type == BTN_TOOL_FINGER) { |
1370 | __set_bit(BTN_LEFT, input_dev->keybit); | 1382 | __set_bit(BTN_LEFT, input_dev->keybit); |
1371 | __set_bit(BTN_FORWARD, input_dev->keybit); | 1383 | __set_bit(BTN_FORWARD, input_dev->keybit); |
1372 | __set_bit(BTN_BACK, input_dev->keybit); | 1384 | __set_bit(BTN_BACK, input_dev->keybit); |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 050acaefee7d..4f0ba21b0196 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #define WACOM_REPORT_INTUOSPAD 12 | 39 | #define WACOM_REPORT_INTUOSPAD 12 |
40 | #define WACOM_REPORT_TPC1FG 6 | 40 | #define WACOM_REPORT_TPC1FG 6 |
41 | #define WACOM_REPORT_TPC2FG 13 | 41 | #define WACOM_REPORT_TPC2FG 13 |
42 | #define WACOM_REPORT_TPCHID 15 | ||
43 | #define WACOM_REPORT_TPCST 16 | ||
42 | 44 | ||
43 | /* device quirks */ | 45 | /* device quirks */ |
44 | #define WACOM_QUIRK_MULTI_INPUT 0x0001 | 46 | #define WACOM_QUIRK_MULTI_INPUT 0x0001 |