mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-01 14:52:32 +00:00
HID: multitouch: make MT_CLS_ALWAYS_TRUE the new default class
By running a test on all the traces of the devices I have, I noticed that the class MT_CLS_ALWAYS_TRUE could handle all the devices I've seen so far without any other quirks. I guess this is the behavior Win 7 requires in its driver. We can change the default class then and keep the existing classes for backward compatibility and performances for some of them. Two operations have been done: * replaced MT_CLS_DEFAULT by MT_CLS_NSMU * then replaced MT_CLS_ALWAYS_TRUE by MT_CLS_DEFAULT Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
e325905c6c
commit
dc3e1d8052
@ -114,7 +114,7 @@ struct mt_device {
|
|||||||
#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007
|
#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007
|
||||||
#define MT_CLS_DUAL_NSMU_CONTACTID 0x0008
|
#define MT_CLS_DUAL_NSMU_CONTACTID 0x0008
|
||||||
#define MT_CLS_INRANGE_CONTACTNUMBER 0x0009
|
#define MT_CLS_INRANGE_CONTACTNUMBER 0x0009
|
||||||
#define MT_CLS_ALWAYS_TRUE 0x000a
|
#define MT_CLS_NSMU 0x000a
|
||||||
#define MT_CLS_DUAL_CONTACT_NUMBER 0x0010
|
#define MT_CLS_DUAL_CONTACT_NUMBER 0x0010
|
||||||
#define MT_CLS_DUAL_CONTACT_ID 0x0011
|
#define MT_CLS_DUAL_CONTACT_ID 0x0011
|
||||||
|
|
||||||
@ -150,6 +150,9 @@ static int cypress_compute_slot(struct mt_device *td)
|
|||||||
|
|
||||||
static struct mt_class mt_classes[] = {
|
static struct mt_class mt_classes[] = {
|
||||||
{ .name = MT_CLS_DEFAULT,
|
{ .name = MT_CLS_DEFAULT,
|
||||||
|
.quirks = MT_QUIRK_ALWAYS_VALID |
|
||||||
|
MT_QUIRK_CONTACT_CNT_ACCURATE },
|
||||||
|
{ .name = MT_CLS_NSMU,
|
||||||
.quirks = MT_QUIRK_NOT_SEEN_MEANS_UP },
|
.quirks = MT_QUIRK_NOT_SEEN_MEANS_UP },
|
||||||
{ .name = MT_CLS_SERIAL,
|
{ .name = MT_CLS_SERIAL,
|
||||||
.quirks = MT_QUIRK_ALWAYS_VALID},
|
.quirks = MT_QUIRK_ALWAYS_VALID},
|
||||||
@ -176,9 +179,6 @@ static struct mt_class mt_classes[] = {
|
|||||||
{ .name = MT_CLS_INRANGE_CONTACTNUMBER,
|
{ .name = MT_CLS_INRANGE_CONTACTNUMBER,
|
||||||
.quirks = MT_QUIRK_VALID_IS_INRANGE |
|
.quirks = MT_QUIRK_VALID_IS_INRANGE |
|
||||||
MT_QUIRK_SLOT_IS_CONTACTNUMBER },
|
MT_QUIRK_SLOT_IS_CONTACTNUMBER },
|
||||||
{ .name = MT_CLS_ALWAYS_TRUE,
|
|
||||||
.quirks = MT_QUIRK_ALWAYS_VALID |
|
|
||||||
MT_QUIRK_CONTACT_CNT_ACCURATE },
|
|
||||||
{ .name = MT_CLS_DUAL_CONTACT_NUMBER,
|
{ .name = MT_CLS_DUAL_CONTACT_NUMBER,
|
||||||
.quirks = MT_QUIRK_ALWAYS_VALID |
|
.quirks = MT_QUIRK_ALWAYS_VALID |
|
||||||
MT_QUIRK_CONTACT_CNT_ACCURATE |
|
MT_QUIRK_CONTACT_CNT_ACCURATE |
|
||||||
@ -939,7 +939,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_3M3266) },
|
USB_DEVICE_ID_3M3266) },
|
||||||
|
|
||||||
/* ActionStar panels */
|
/* ActionStar panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
|
MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
|
||||||
USB_DEVICE_ID_ACTIONSTAR_1011) },
|
USB_DEVICE_ID_ACTIONSTAR_1011) },
|
||||||
|
|
||||||
@ -952,7 +952,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) },
|
USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) },
|
||||||
|
|
||||||
/* Baanto multitouch devices */
|
/* Baanto multitouch devices */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_BAANTO,
|
MT_USB_DEVICE(USB_VENDOR_ID_BAANTO,
|
||||||
USB_DEVICE_ID_BAANTO_MT_190W2) },
|
USB_DEVICE_ID_BAANTO_MT_190W2) },
|
||||||
/* Cando panels */
|
/* Cando panels */
|
||||||
@ -970,12 +970,12 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) },
|
USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) },
|
||||||
|
|
||||||
/* Chunghwa Telecom touch panels */
|
/* Chunghwa Telecom touch panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
|
MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
|
||||||
USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
|
USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
|
||||||
|
|
||||||
/* CVTouch panels */
|
/* CVTouch panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH,
|
MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH,
|
||||||
USB_DEVICE_ID_CVTOUCH_SCREEN) },
|
USB_DEVICE_ID_CVTOUCH_SCREEN) },
|
||||||
|
|
||||||
@ -1064,12 +1064,12 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) },
|
USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) },
|
||||||
|
|
||||||
/* Gametel game controller */
|
/* Gametel game controller */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL,
|
MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL,
|
||||||
USB_DEVICE_ID_GAMETEL_MT_MODE) },
|
USB_DEVICE_ID_GAMETEL_MT_MODE) },
|
||||||
|
|
||||||
/* GoodTouch panels */
|
/* GoodTouch panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
|
MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
|
||||||
USB_DEVICE_ID_GOODTOUCH_000f) },
|
USB_DEVICE_ID_GOODTOUCH_000f) },
|
||||||
|
|
||||||
@ -1087,7 +1087,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_IDEACOM_IDC6651) },
|
USB_DEVICE_ID_IDEACOM_IDC6651) },
|
||||||
|
|
||||||
/* Ilitek dual touch panel */
|
/* Ilitek dual touch panel */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
|
MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
|
||||||
USB_DEVICE_ID_ILITEK_MULTITOUCH) },
|
USB_DEVICE_ID_ILITEK_MULTITOUCH) },
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
|
USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
|
||||||
|
|
||||||
/* Nexio panels */
|
/* Nexio panels */
|
||||||
{ .driver_data = MT_CLS_ALWAYS_TRUE,
|
{ .driver_data = MT_CLS_DEFAULT,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_NEXIO,
|
MT_USB_DEVICE(USB_VENDOR_ID_NEXIO,
|
||||||
USB_DEVICE_ID_NEXIO_MULTITOUCH_420)},
|
USB_DEVICE_ID_NEXIO_MULTITOUCH_420)},
|
||||||
|
|
||||||
@ -1134,7 +1134,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_PANABOARD_UBT880) },
|
USB_DEVICE_ID_PANABOARD_UBT880) },
|
||||||
|
|
||||||
/* Novatek Panel */
|
/* Novatek Panel */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK,
|
MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK,
|
||||||
USB_DEVICE_ID_NOVATEK_PCT) },
|
USB_DEVICE_ID_NOVATEK_PCT) },
|
||||||
|
|
||||||
@ -1180,7 +1180,7 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
{ .driver_data = MT_CLS_CONFIDENCE,
|
{ .driver_data = MT_CLS_CONFIDENCE,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM,
|
MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM,
|
||||||
USB_DEVICE_ID_MTP_STM)},
|
USB_DEVICE_ID_MTP_STM)},
|
||||||
{ .driver_data = MT_CLS_ALWAYS_TRUE,
|
{ .driver_data = MT_CLS_DEFAULT,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
|
MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
|
||||||
USB_DEVICE_ID_MTP_SITRONIX)},
|
USB_DEVICE_ID_MTP_SITRONIX)},
|
||||||
|
|
||||||
@ -1190,48 +1190,48 @@ static const struct hid_device_id mt_devices[] = {
|
|||||||
USB_DEVICE_ID_TOPSEED2_PERIPAD_701) },
|
USB_DEVICE_ID_TOPSEED2_PERIPAD_701) },
|
||||||
|
|
||||||
/* Touch International panels */
|
/* Touch International panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
|
MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
|
||||||
USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },
|
USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },
|
||||||
|
|
||||||
/* Unitec panels */
|
/* Unitec panels */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
|
MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
|
||||||
USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
|
USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
|
MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
|
||||||
USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
|
USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
|
||||||
/* XAT */
|
/* XAT */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XAT,
|
MT_USB_DEVICE(USB_VENDOR_ID_XAT,
|
||||||
USB_DEVICE_ID_XAT_CSR) },
|
USB_DEVICE_ID_XAT_CSR) },
|
||||||
|
|
||||||
/* Xiroku */
|
/* Xiroku */
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_SPX) },
|
USB_DEVICE_ID_XIROKU_SPX) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_MPX) },
|
USB_DEVICE_ID_XIROKU_MPX) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_CSR) },
|
USB_DEVICE_ID_XIROKU_CSR) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_SPX1) },
|
USB_DEVICE_ID_XIROKU_SPX1) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_MPX1) },
|
USB_DEVICE_ID_XIROKU_MPX1) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_CSR1) },
|
USB_DEVICE_ID_XIROKU_CSR1) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_SPX2) },
|
USB_DEVICE_ID_XIROKU_SPX2) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_MPX2) },
|
USB_DEVICE_ID_XIROKU_MPX2) },
|
||||||
{ .driver_data = MT_CLS_DEFAULT,
|
{ .driver_data = MT_CLS_NSMU,
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||||
USB_DEVICE_ID_XIROKU_CSR2) },
|
USB_DEVICE_ID_XIROKU_CSR2) },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user