2 * HID driver for PenMount touchscreens
4 * Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com>
6 * based on hid-penmount copyrighted by
7 * PenMount Touch Solutions <penmount <at> seed.net.tw>
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)
17 #include <linux/module.h>
18 #include <linux/hid.h>
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
)
25 if ((usage
->hid
& HID_USAGE_PAGE
) == HID_UP_BUTTON
) {
26 hid_map_usage(hi
, usage
, bit
, max
, EV_KEY
, BTN_TOUCH
);
33 static const struct hid_device_id penmount_devices
[] = {
34 { HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT
, USB_DEVICE_ID_PENMOUNT_6000
) },
37 MODULE_DEVICE_TABLE(hid
, penmount_devices
);
39 static struct hid_driver penmount_driver
= {
40 .name
= "hid-penmount",
41 .id_table
= penmount_devices
,
42 .input_mapping
= penmount_input_mapping
,
45 module_hid_driver(penmount_driver
);
47 MODULE_AUTHOR("Christian Gmeiner <christian.gmeiner@gmail.com>");
48 MODULE_DESCRIPTION("PenMount HID TouchScreen driver");
49 MODULE_LICENSE("GPL");