hid:Fix problem on GeneralTouch multi-touchscreen
PATCH 1/1 hid:Fix problem on GeneralTouch multi-touchscreen
From: Xianhan Yu <[email protected]>
Fix the touch-up no response problem on GeneralTouch twofingers touchscreen and modify the driver for new GeneralTouch PWT touchscreen.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-)
drivers/hid/hid-ids.h +1 -0
@@ -305,6 +305,7 @@#define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc#define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003 +#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS 0x0100#define USB_VENDOR_ID_GLAB 0x06c2#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038
drivers/hid/hid-multitouch.c +17 -1
@@ -115,6 +115,8 @@ struct mt_device {#define MT_CLS_EGALAX_SERIAL 0x0104#define MT_CLS_TOPSEED 0x0105#define MT_CLS_PANASONIC 0x0106 +#define MT_CLS_GENERALTOUCH_TWOFINGERS 0X0107 +#define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0X0108#define MT_DEFAULT_MAXCONTACT 10
@@ -215,6 +217,17 @@ static struct mt_class mt_classes[] = { { .name = MT_CLS_PANASONIC, .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP, .maxcontacts = 4 }, + { .name = MT_CLS_GENERALTOUCH_TWOFINGERS, + .quirks =MT_QUIRK_NOT_SEEN_MEANS_UP | +MT_QUIRK_VALID_IS_INRANGE | + MT_QUIRK_SLOT_IS_CONTACTNUMBER, + .maxcontacts =2 + }, + { .name = MT_CLS_GENERALTOUCH_PWT_TENFINGERS, + .quirks =MT_QUIRK_NOT_SEEN_MEANS_UP | + MT_QUIRK_SLOT_IS_CONTACTNUMBER, + .maxcontacts =10 + }, { } };
@@ -893,9 +906,12 @@ static const struct hid_device_id mt_devices[] = { USB_DEVICE_ID_ELO_TS2515) },/* GeneralTouch panel */ - { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, + { .driver_data = MT_CLS_GENERALTOUCH_TWOFINGERS,MT_USB_DEVICE (USB_VENDOR_ID_GENERAL_TOUCH , USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, + { .driver_data = MT_CLS_GENERALTOUCH_PWT_TENFINGERS, +MT_USB_DEVICE (USB_VENDOR_ID_GENERAL_TOUCH , + USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) }, /* Gametel game controller */ { .driver_data = MT_CLS_DEFAULT,
Signature · 1 line
1.7.9.5
Quoted 6 lines · GeneralTouch
From: Xianhan Yu <[email protected]>
Fix the touch-up no response problem on GeneralTouch twofingers touchscreen and modify the driver for new GeneralTouch PWT touchscreen.
Signed-off-by Xianhan Yu <[email protected]>
Thank you for the patch. Please find a few comments below. Please address those and resubmit.
Also adding Henrik to CC, as he is maintainer of hid multitouch.
Quoted 22 lines
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-multitouch.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-)drivers/hid/hid-ids.h +1
-0@@ -305,6 +305,7 @@#define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc#define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003 +#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS 0x0100#define USB_VENDOR_ID_GLAB 0x06c2#define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038drivers/hid/hid-multitouch.c +0
-0
drivers/hid/hid-multitouch.c struct mt_device { · line 119
Quoted 5 lines
drivers/hid/hid-multitouch.c +2
-0@@ -115,6 +115,8 @@ struct mt_device {#define MT_CLS_EGALAX_SERIAL 0x0104#define MT_CLS_TOPSEED 0x0105#define MT_CLS_PANASONIC 0x0106 +#define MT_CLS_GENERALTOUCH_TWOFINGERS 0X0107 +#define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0X0108
Please use '0x' here as a prefix. Both are correct, but the convention is to use 0x at least in the kernel.
Also please use tabs instead of spaces to properly align with the rest of the constants.
Quoted 8 lines
drivers/hid/hid-multitouch.c +1
-0#define MT_DEFAULT_MAXCONTACT 10@@ -215,6 +217,17 @@ static struct mt_class mt_classes[] = { { .name = MT_CLS_PANASONIC, .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP, .maxcontacts = 4 }, + { .name = MT_CLS_GENERALTOUCH_TWOFINGERS,
drivers/hid/hid-multitouch.c static struct mt_class mt_classes[] = { · line 230
Quoted 10 lines
drivers/hid/hid-multitouch.c +10
-0+ .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | +MT_QUIRK_VALID_IS_INRANGE | + MT_QUIRK_SLOT_IS_CONTACTNUMBER, + .maxcontacts =2 + }, + { .name = MT_CLS_GENERALTOUCH_PWT_TENFINGERS, + .quirks =MT_QUIRK_NOT_SEEN_MEANS_UP | + MT_QUIRK_SLOT_IS_CONTACTNUMBER, + .maxcontacts =10 + },
Please use tabs as well here, to use the same formatting as the rest of the file.
Quoted 7 lines
drivers/hid/hid-multitouch.c +0
-0{ } };@@ -893,9 +906,12 @@ static const struct hid_device_id mt_devices[] = { USB_DEVICE_ID_ELO_TS2515) },/* GeneralTouch panel */
drivers/hid/hid-multitouch.c static const struct hid_device_id mt_devices[] = { · line 917
Quoted 10 lines
drivers/hid/hid-multitouch.c +4
-1- { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, + { .driver_data = MT_CLS_GENERALTOUCH_TWOFINGERS,MT_USB_DEVICE (USB_VENDOR_ID_GENERAL_TOUCH , USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, + { .driver_data = MT_CLS_GENERALTOUCH_PWT_TENFINGERS, +MT_USB_DEVICE (USB_VENDOR_ID_GENERAL_TOUCH , + USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) }, /* Gametel game controller */ { .driver_data = MT_CLS_DEFAULT,
And here as well.
Signature · 2 lines
Jiri Kosina SUSE Labs