diff options
-rw-r--r-- | drivers/hid/Kconfig | 11 | ||||
-rw-r--r-- | drivers/hid/Makefile | 1 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 1 | ||||
-rw-r--r-- | drivers/hid/hid-penmount.c | 49 |
5 files changed, 63 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index c18d5d71062d..f42df4dd58d2 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -530,6 +530,17 @@ config PANTHERLORD_FF | |||
530 | Say Y here if you have a PantherLord/GreenAsia based game controller | 530 | Say Y here if you have a PantherLord/GreenAsia based game controller |
531 | or adapter and want to enable force feedback support for it. | 531 | or adapter and want to enable force feedback support for it. |
532 | 532 | ||
533 | config HID_PENMOUNT | ||
534 | tristate "Penmount touch device" | ||
535 | depends on USB_HID | ||
536 | ---help--- | ||
537 | This selects a driver for the PenMount 6000 touch controller. | ||
538 | |||
539 | The driver works around a problem in the report descript allowing | ||
540 | the userspace to touch events instead of mouse events. | ||
541 | |||
542 | Say Y here if you have a Penmount based touch controller. | ||
543 | |||
533 | config HID_PETALYNX | 544 | config HID_PETALYNX |
534 | tristate "Petalynx Maxter remote control" | 545 | tristate "Petalynx Maxter remote control" |
535 | depends on HID | 546 | depends on HID |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 4dbac7f8530c..e2850d8af9ca 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o | |||
71 | obj-$(CONFIG_HID_ORTEK) += hid-ortek.o | 71 | obj-$(CONFIG_HID_ORTEK) += hid-ortek.o |
72 | obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o | 72 | obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o |
73 | obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o | 73 | obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o |
74 | obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o | ||
74 | obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o | 75 | obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o |
75 | obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o | 76 | obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o |
76 | hid-picolcd-y += hid-picolcd_core.o | 77 | hid-picolcd-y += hid-picolcd_core.o |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 12b6e67d9de0..6827196be3fc 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1880,6 +1880,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1880 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) }, | 1880 | { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) }, |
1881 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, | 1881 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) }, |
1882 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, | 1882 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, |
1883 | { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) }, | ||
1883 | { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, | 1884 | { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, |
1884 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, | 1885 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, |
1885 | #if IS_ENABLED(CONFIG_HID_ROCCAT) | 1886 | #if IS_ENABLED(CONFIG_HID_ROCCAT) |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 25cd674d6064..3943ffe1a333 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -722,6 +722,7 @@ | |||
722 | #define USB_DEVICE_ID_PENMOUNT_PCI 0x3500 | 722 | #define USB_DEVICE_ID_PENMOUNT_PCI 0x3500 |
723 | #define USB_DEVICE_ID_PENMOUNT_1610 0x1610 | 723 | #define USB_DEVICE_ID_PENMOUNT_1610 0x1610 |
724 | #define USB_DEVICE_ID_PENMOUNT_1640 0x1640 | 724 | #define USB_DEVICE_ID_PENMOUNT_1640 0x1640 |
725 | #define USB_DEVICE_ID_PENMOUNT_6000 0x6000 | ||
725 | 726 | ||
726 | #define USB_VENDOR_ID_PETALYNX 0x18b1 | 727 | #define USB_VENDOR_ID_PETALYNX 0x18b1 |
727 | #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037 | 728 | #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037 |
diff --git a/drivers/hid/hid-penmount.c b/drivers/hid/hid-penmount.c new file mode 100644 index 000000000000..c11dce85cd18 --- /dev/null +++ b/drivers/hid/hid-penmount.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * HID driver for PenMount touchscreens | ||
3 | * | ||
4 | * Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com> | ||
5 | * | ||
6 | * based on hid-penmount copyrighted by | ||
7 | * PenMount Touch Solutions <penmount <at> seed.net.tw> | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the Free | ||
13 | * Software Foundation; either version 2 of the License, or (at your option) | ||
14 | * any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | #include <linux/hid.h> | ||
19 | #include "hid-ids.h" | ||
20 | |||
21 | static int penmount_input_mapping(struct hid_device *hdev, | ||
22 | struct hid_input *hi, struct hid_field *field, | ||
23 | struct hid_usage *usage, unsigned long **bit, int *max) | ||
24 | { | ||
25 | if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { | ||
26 | hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); | ||
27 | return 1; | ||
28 | } | ||
29 | |||
30 | return 0; | ||
31 | } | ||
32 | |||
33 | static const struct hid_device_id penmount_devices[] = { | ||
34 | { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) }, | ||
35 | { } | ||
36 | }; | ||
37 | MODULE_DEVICE_TABLE(hid, penmount_devices); | ||
38 | |||
39 | static struct hid_driver penmount_driver = { | ||
40 | .name = "hid-penmount", | ||
41 | .id_table = penmount_devices, | ||
42 | .input_mapping = penmount_input_mapping, | ||
43 | }; | ||
44 | |||
45 | module_hid_driver(penmount_driver); | ||
46 | |||
47 | MODULE_AUTHOR("Christian Gmeiner <christian.gmeiner@gmail.com>"); | ||
48 | MODULE_DESCRIPTION("PenMount HID TouchScreen driver"); | ||
49 | MODULE_LICENSE("GPL"); | ||