diff options
| -rw-r--r-- | drivers/hid/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/hid/Makefile | 1 | ||||
| -rw-r--r-- | drivers/hid/hid-accutouch.c | 52 | ||||
| -rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
| -rw-r--r-- | drivers/hid/hid-ids.h | 1 |
5 files changed, 67 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 1aeb80e52424..fb4cc0d28eea 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
| @@ -98,6 +98,18 @@ config HID_A4TECH | |||
| 98 | ---help--- | 98 | ---help--- |
| 99 | Support for A4 tech X5 and WOP-35 / Trust 450L mice. | 99 | Support for A4 tech X5 and WOP-35 / Trust 450L mice. |
| 100 | 100 | ||
| 101 | config HID_ACCUTOUCH | ||
| 102 | tristate "Accutouch touch device" | ||
| 103 | depends on USB_HID | ||
| 104 | ---help--- | ||
| 105 | This selects a driver for the Accutouch 2216 touch controller. | ||
| 106 | |||
| 107 | The driver works around a problem in the reported device capabilities | ||
| 108 | which causes userspace to detect the device as a mouse rather than | ||
| 109 | a touchscreen. | ||
| 110 | |||
| 111 | Say Y here if you have a Accutouch 2216 touch controller. | ||
| 112 | |||
| 101 | config HID_ACRUX | 113 | config HID_ACRUX |
| 102 | tristate "ACRUX game controller support" | 114 | tristate "ACRUX game controller support" |
| 103 | depends on HID | 115 | depends on HID |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 4d111f23e801..48be3ed9be4e 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
| @@ -21,6 +21,7 @@ hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o | |||
| 21 | hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o | 21 | hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o |
| 22 | 22 | ||
| 23 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o | 23 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o |
| 24 | obj-$(CONFIG_HID_ACCUTOUCH) += hid-accutouch.o | ||
| 24 | obj-$(CONFIG_HID_ALPS) += hid-alps.o | 25 | obj-$(CONFIG_HID_ALPS) += hid-alps.o |
| 25 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o | 26 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o |
| 26 | obj-$(CONFIG_HID_APPLE) += hid-apple.o | 27 | obj-$(CONFIG_HID_APPLE) += hid-apple.o |
diff --git a/drivers/hid/hid-accutouch.c b/drivers/hid/hid-accutouch.c new file mode 100644 index 000000000000..4e287160c50a --- /dev/null +++ b/drivers/hid/hid-accutouch.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | * HID driver for Elo Accutouch touchscreens | ||
| 3 | * | ||
| 4 | * Copyright (c) 2016, Collabora Ltd. | ||
| 5 | * Copyright (c) 2016, General Electric Company | ||
| 6 | * | ||
| 7 | * based on hid-penmount.c | ||
| 8 | * Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com> | ||
| 9 | */ | ||
| 10 | |||
| 11 | /* | ||
| 12 | * This program is free software; you can redistribute it and/or modify it | ||
| 13 | * under the terms of the GNU General Public License as published by the Free | ||
| 14 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 15 | * any later version. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/hid.h> | ||
| 19 | #include <linux/module.h> | ||
| 20 | #include "hid-ids.h" | ||
| 21 | |||
| 22 | static int accutouch_input_mapping(struct hid_device *hdev, | ||
| 23 | struct hid_input *hi, | ||
| 24 | struct hid_field *field, | ||
| 25 | struct hid_usage *usage, | ||
| 26 | unsigned long **bit, int *max) | ||
| 27 | { | ||
| 28 | if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { | ||
| 29 | hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); | ||
| 30 | return 1; | ||
| 31 | } | ||
| 32 | |||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | static const struct hid_device_id accutouch_devices[] = { | ||
| 37 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) }, | ||
| 38 | { } | ||
| 39 | }; | ||
| 40 | MODULE_DEVICE_TABLE(hid, accutouch_devices); | ||
| 41 | |||
| 42 | static struct hid_driver accutouch_driver = { | ||
| 43 | .name = "hid-accutouch", | ||
| 44 | .id_table = accutouch_devices, | ||
| 45 | .input_mapping = accutouch_input_mapping, | ||
| 46 | }; | ||
| 47 | |||
| 48 | module_hid_driver(accutouch_driver); | ||
| 49 | |||
| 50 | MODULE_AUTHOR("Martyn Welch <martyn.welch@collabora.co.uk"); | ||
| 51 | MODULE_DESCRIPTION("Elo Accutouch HID TouchScreen driver"); | ||
| 52 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e9e87d337446..a4cb18ed7b01 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
| @@ -1891,6 +1891,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
| 1891 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | 1891 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, |
| 1892 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) }, | 1892 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) }, |
| 1893 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) }, | 1893 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) }, |
| 1894 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) }, | ||
| 1894 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, | 1895 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, |
| 1895 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, | 1896 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, |
| 1896 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | 1897 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 86c95d30ac80..af517973ec2c 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
| @@ -363,6 +363,7 @@ | |||
| 363 | #define USB_VENDOR_ID_ELO 0x04E7 | 363 | #define USB_VENDOR_ID_ELO 0x04E7 |
| 364 | #define USB_DEVICE_ID_ELO_TS2515 0x0022 | 364 | #define USB_DEVICE_ID_ELO_TS2515 0x0022 |
| 365 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 | 365 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 |
| 366 | #define USB_DEVICE_ID_ELO_ACCUTOUCH_2216 0x0050 | ||
| 366 | 367 | ||
| 367 | #define USB_VENDOR_ID_EMS 0x2006 | 368 | #define USB_VENDOR_ID_EMS 0x2006 |
| 368 | #define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118 | 369 | #define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118 |
