Skip to content

Commit

Permalink
HID: hid-multitouch: merge hid-mosart into hid-multitouch
Browse files Browse the repository at this point in the history
This patch include MosArt devices into hid-multitouch.
MosArt devices now support mt-protocol B.

We also need to introduce a new quirk for mosart devices to support
their contactID.

Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Apr 22, 2011
1 parent 6ab3a9a commit 4a6ee68
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 304 deletions.
7 changes: 1 addition & 6 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ config HID_MICROSOFT
---help---
Support for Microsoft devices that are not fully compliant with HID standard.

config HID_MOSART
tristate "MosArt dual-touch panels"
depends on USB_HID
---help---
Support for MosArt dual-touch panels.

config HID_MONTEREY
tristate "Monterey Genius KB29E keyboard" if EXPERT
depends on USB_HID
Expand All @@ -313,6 +307,7 @@ config HID_MULTITOUCH
- Cypress TrueTouch panels
- Hanvon dual touch panels
- IrTouch Infrared USB panels
- MosArt dual-touch panels
- PenMount dual touch panels
- Pixcir dual touch panels
- 'Sensing Win7-TwoFinger' panel by GeneralTouch
Expand Down
1 change: 0 additions & 1 deletion drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
obj-$(CONFIG_HID_MAGICMOUSE) += hid-magicmouse.o
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
obj-$(CONFIG_HID_MOSART) += hid-mosart.o
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
Expand Down
296 changes: 0 additions & 296 deletions drivers/hid/hid-mosart.c

This file was deleted.

20 changes: 19 additions & 1 deletion drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_VALID_IS_INRANGE (1 << 4)
#define MT_QUIRK_VALID_IS_CONFIDENCE (1 << 5)
#define MT_QUIRK_EGALAX_XYZ_FIXUP (1 << 6)
#define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE (1 << 7)

struct mt_slot {
__s32 x, y, p, w, h;
Expand Down Expand Up @@ -90,6 +91,7 @@ struct mt_class {
#define MT_CLS_STANTUM 6
#define MT_CLS_3M 7
#define MT_CLS_CONFIDENCE 8
#define MT_CLS_CONFIDENCE_MINUS_ONE 9

#define MT_DEFAULT_MAXCONTACT 10

Expand Down Expand Up @@ -140,7 +142,9 @@ struct mt_class mt_classes[] = {
.quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
MT_QUIRK_CYPRESS,
.maxcontacts = 10 },

{ .name = MT_CLS_CONFIDENCE_MINUS_ONE,
.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE },
{ .name = MT_CLS_EGALAX,
.quirks = MT_QUIRK_SLOT_IS_CONTACTID |
MT_QUIRK_VALID_IS_INRANGE |
Expand Down Expand Up @@ -325,6 +329,9 @@ static int mt_compute_slot(struct mt_device *td)
if (quirks & MT_QUIRK_SLOT_IS_CONTACTNUMBER)
return td->num_received;

if (quirks & MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE)
return td->curdata.contactid - 1;

return find_slot_from_contactid(td);
}

Expand Down Expand Up @@ -587,6 +594,17 @@ static const struct hid_device_id mt_devices[] = {
HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },

/* MosArt panels */
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
USB_DEVICE_ID_ASUS_T91MT)},
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
HID_USB_DEVICE(USB_VENDOR_ID_ASUS,
USB_DEVICE_ID_ASUSTEK_MULTITOUCH_YFO) },
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
HID_USB_DEVICE(USB_VENDOR_ID_TURBOX,
USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },

/* PenMount panels */
{ .driver_data = MT_CLS_CONFIDENCE,
HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
Expand Down

0 comments on commit 4a6ee68

Please sign in to comment.