ocfs2: avoid inode removal while nfsd is accessing it
[linux/fpc-iii.git] / drivers / hid / hid-accutouch.c
blobbb6c997e9efda62db9e546aaf9953af003dd471b
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * HID driver for Elo Accutouch touchscreens
5 * Copyright (c) 2016, Collabora Ltd.
6 * Copyright (c) 2016, General Electric Company
8 * based on hid-penmount.c
9 * Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com>
15 #include <linux/hid.h>
16 #include <linux/module.h>
17 #include "hid-ids.h"
19 static int accutouch_input_mapping(struct hid_device *hdev,
20 struct hid_input *hi,
21 struct hid_field *field,
22 struct hid_usage *usage,
23 unsigned long **bit, int *max)
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;
30 return 0;
33 static const struct hid_device_id accutouch_devices[] = {
34 { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
35 { }
37 MODULE_DEVICE_TABLE(hid, accutouch_devices);
39 static struct hid_driver accutouch_driver = {
40 .name = "hid-accutouch",
41 .id_table = accutouch_devices,
42 .input_mapping = accutouch_input_mapping,
45 module_hid_driver(accutouch_driver);
47 MODULE_AUTHOR("Martyn Welch <martyn.welch@collabora.co.uk");
48 MODULE_DESCRIPTION("Elo Accutouch HID TouchScreen driver");
49 MODULE_LICENSE("GPL");