{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
/* quirks to control the device */
#define MT_QUIRK_NOT_SEEN_MEANS_UP (1 << 0)
#define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1)
+#define MT_QUIRK_CYPRESS (1 << 2)
struct mt_slot {
__s32 x, y, p, w, h;
/* classes of device behavior */
#define MT_CLS_DEFAULT 0
#define MT_CLS_DUAL1 1
+#define MT_CLS_CYPRESS 2
/*
* these device-dependent functions determine what slot corresponds
return td->curdata.contactid;
}
+static int cypress_compute_slot(struct mt_device *td)
+{
+ if (td->curdata.contactid != 0 || td->num_received == 0)
+ return td->curdata.contactid;
+ else
+ return -1;
+}
+
static int find_slot_from_contactid(struct mt_device *td)
{
int i;
struct mt_class mt_classes[] = {
{ 0, 0, 0, 10 }, /* MT_CLS_DEFAULT */
{ MT_QUIRK_SLOT_IS_CONTACTID, 0, 0, 2 }, /* MT_CLS_DUAL1 */
+ { MT_QUIRK_CYPRESS | MT_QUIRK_NOT_SEEN_MEANS_UP, 0, 0, 10 }, /* MT_CLS_CYPRESS */
};
static void mt_feature_mapping(struct hid_device *hdev, struct hid_input *hi,
if (cls->quirks & MT_QUIRK_SLOT_IS_CONTACTID)
return slot_is_contactid(td);
+ if (cls->quirks & MT_QUIRK_CYPRESS)
+ return cypress_compute_slot(td);
+
return find_slot_from_contactid(td);
}
static const struct hid_device_id mt_devices[] = {
+ /* Cypress panel */
+ { .driver_data = MT_CLS_CYPRESS,
+ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS,
+ USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
+
/* PixCir-based panels */
{ .driver_data = MT_CLS_DUAL1,
HID_USB_DEVICE(USB_VENDOR_ID_HANVON,