diff options
-rw-r--r-- | drivers/hid/Kconfig | 1 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 1 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 18 |
4 files changed, 20 insertions, 2 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index de31d75e276f..9bd21482e618 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -294,6 +294,7 @@ config HID_MULTITOUCH | |||
294 | Say Y here if you have one of the following devices: | 294 | Say Y here if you have one of the following devices: |
295 | - PixCir touchscreen | 295 | - PixCir touchscreen |
296 | - Cypress TrueTouch | 296 | - Cypress TrueTouch |
297 | - 'Sensing Win7-TwoFinger' panel by GeneralTouch | ||
297 | 298 | ||
298 | config HID_NTRIG | 299 | config HID_NTRIG |
299 | tristate "N-Trig touch screen" | 300 | tristate "N-Trig touch screen" |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 12d4afafc73b..42cfc9464c0a 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1309,6 +1309,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1309 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, | 1309 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, |
1310 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | 1310 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, |
1311 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, | 1311 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, |
1312 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, | ||
1312 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, | 1313 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, |
1313 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, | 1314 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, |
1314 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, | 1315 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, |
@@ -1614,7 +1615,6 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1614 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, | 1615 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, |
1615 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, | 1616 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, |
1616 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, | 1617 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, |
1617 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, | ||
1618 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, | 1618 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, |
1619 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, | 1619 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, |
1620 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0004) }, | 1620 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0004) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index f5657a8c757d..265c747ba9b8 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -228,6 +228,7 @@ | |||
228 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 | 228 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 |
229 | 229 | ||
230 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc | 230 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc |
231 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0001 | ||
231 | 232 | ||
232 | #define USB_VENDOR_ID_GLAB 0x06c2 | 233 | #define USB_VENDOR_ID_GLAB 0x06c2 |
233 | #define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 | 234 | #define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 7af9f7136bd5..3442ed56e964 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -33,6 +33,7 @@ MODULE_LICENSE("GPL"); | |||
33 | #define MT_QUIRK_NOT_SEEN_MEANS_UP (1 << 0) | 33 | #define MT_QUIRK_NOT_SEEN_MEANS_UP (1 << 0) |
34 | #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) | 34 | #define MT_QUIRK_SLOT_IS_CONTACTID (1 << 1) |
35 | #define MT_QUIRK_CYPRESS (1 << 2) | 35 | #define MT_QUIRK_CYPRESS (1 << 2) |
36 | #define MT_QUIRK_SLOT_IS_CONTACTNUMBER (1 << 3) | ||
36 | 37 | ||
37 | struct mt_slot { | 38 | struct mt_slot { |
38 | __s32 x, y, p, w, h; | 39 | __s32 x, y, p, w, h; |
@@ -63,7 +64,8 @@ struct mt_class { | |||
63 | /* classes of device behavior */ | 64 | /* classes of device behavior */ |
64 | #define MT_CLS_DEFAULT 0 | 65 | #define MT_CLS_DEFAULT 0 |
65 | #define MT_CLS_DUAL1 1 | 66 | #define MT_CLS_DUAL1 1 |
66 | #define MT_CLS_CYPRESS 2 | 67 | #define MT_CLS_DUAL2 2 |
68 | #define MT_CLS_CYPRESS 3 | ||
67 | 69 | ||
68 | /* | 70 | /* |
69 | * these device-dependent functions determine what slot corresponds | 71 | * these device-dependent functions determine what slot corresponds |
@@ -75,6 +77,11 @@ static int slot_is_contactid(struct mt_device *td) | |||
75 | return td->curdata.contactid; | 77 | return td->curdata.contactid; |
76 | } | 78 | } |
77 | 79 | ||
80 | static int slot_is_contactnumber(struct mt_device *td) | ||
81 | { | ||
82 | return td->num_received; | ||
83 | } | ||
84 | |||
78 | static int cypress_compute_slot(struct mt_device *td) | 85 | static int cypress_compute_slot(struct mt_device *td) |
79 | { | 86 | { |
80 | if (td->curdata.contactid != 0 || td->num_received == 0) | 87 | if (td->curdata.contactid != 0 || td->num_received == 0) |
@@ -105,6 +112,7 @@ static int find_slot_from_contactid(struct mt_device *td) | |||
105 | struct mt_class mt_classes[] = { | 112 | struct mt_class mt_classes[] = { |
106 | { 0, 0, 0, 10 }, /* MT_CLS_DEFAULT */ | 113 | { 0, 0, 0, 10 }, /* MT_CLS_DEFAULT */ |
107 | { MT_QUIRK_SLOT_IS_CONTACTID, 0, 0, 2 }, /* MT_CLS_DUAL1 */ | 114 | { MT_QUIRK_SLOT_IS_CONTACTID, 0, 0, 2 }, /* MT_CLS_DUAL1 */ |
115 | { MT_QUIRK_SLOT_IS_CONTACTNUMBER, 0, 0, 10 }, /* MT_CLS_DUAL2 */ | ||
108 | { MT_QUIRK_CYPRESS | MT_QUIRK_NOT_SEEN_MEANS_UP, 0, 0, 10 }, /* MT_CLS_CYPRESS */ | 116 | { MT_QUIRK_CYPRESS | MT_QUIRK_NOT_SEEN_MEANS_UP, 0, 0, 10 }, /* MT_CLS_CYPRESS */ |
109 | }; | 117 | }; |
110 | 118 | ||
@@ -237,6 +245,9 @@ static int mt_compute_slot(struct mt_device *td) | |||
237 | if (cls->quirks & MT_QUIRK_CYPRESS) | 245 | if (cls->quirks & MT_QUIRK_CYPRESS) |
238 | return cypress_compute_slot(td); | 246 | return cypress_compute_slot(td); |
239 | 247 | ||
248 | if (cls->quirks & MT_QUIRK_SLOT_IS_CONTACTNUMBER) | ||
249 | return slot_is_contactnumber(td); | ||
250 | |||
240 | return find_slot_from_contactid(td); | 251 | return find_slot_from_contactid(td); |
241 | } | 252 | } |
242 | 253 | ||
@@ -441,6 +452,11 @@ static const struct hid_device_id mt_devices[] = { | |||
441 | HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, | 452 | HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, |
442 | USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, | 453 | USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, |
443 | 454 | ||
455 | /* GeneralTouch panel */ | ||
456 | { .driver_data = MT_CLS_DUAL2, | ||
457 | HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, | ||
458 | USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, | ||
459 | |||
444 | /* PixCir-based panels */ | 460 | /* PixCir-based panels */ |
445 | { .driver_data = MT_CLS_DUAL1, | 461 | { .driver_data = MT_CLS_DUAL1, |
446 | HID_USB_DEVICE(USB_VENDOR_ID_HANVON, | 462 | HID_USB_DEVICE(USB_VENDOR_ID_HANVON, |