summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorDenis Kovalev <Denis.Kovalev@dataart.com>2012-02-14 00:50:33 -0800
committerJiri Kosina <jkosina@suse.cz>2012-02-21 11:55:45 +0100
commit2258e863b451be319d374f89688000ab858b13c3 (patch)
tree43c763eb2d047cfc728fcfc9020360165e53c294 /drivers/hid/hid-multitouch.c
parent847672cd141c07db3d5fc1442b4c3e8a702488df (diff)
downloadop-kernel-dev-2258e863b451be319d374f89688000ab858b13c3.zip
op-kernel-dev-2258e863b451be319d374f89688000ab858b13c3.tar.gz
HID: multitouch: add support of Panasonic multitouch panels
While at it, also fix some minor codingstyle issues. Signed-off-by: Denis Kovalev <Denis.Kovalev@dataart.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 387a72f..09e42ef 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -104,6 +104,7 @@ struct mt_device {
#define MT_CLS_EGALAX 0x0103
#define MT_CLS_EGALAX_SERIAL 0x0104
#define MT_CLS_TOPSEED 0x0105
+#define MT_CLS_PANASONIC 0x0106
#define MT_DEFAULT_MAXCONTACT 10
@@ -198,6 +199,9 @@ static struct mt_class mt_classes[] = {
.is_indirect = true,
.maxcontacts = 2,
},
+ { .name = MT_CLS_PANASONIC,
+ .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
+ .maxcontacts = 4 },
{ }
};
@@ -278,8 +282,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
int code;
/* Only map fields from TouchScreen or TouchPad collections.
- * We need to ignore fields that belong to other collections
- * such as Mouse that might have the same GenericDesktop usages. */
+ * We need to ignore fields that belong to other collections
+ * such as Mouse that might have the same GenericDesktop usages. */
if (field->application == HID_DG_TOUCHSCREEN)
set_bit(INPUT_PROP_DIRECT, hi->input->propbit);
else if (field->application != HID_DG_TOUCHPAD)
@@ -581,9 +585,8 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
return 0;
}
- if (usage->hid == td->last_slot_field) {
+ if (usage->hid == td->last_slot_field)
mt_complete_slot(td);
- }
if (field->index == td->last_field_index
&& td->num_received >= td->num_expected)
@@ -857,6 +860,14 @@ static const struct hid_device_id mt_devices[] = {
HID_USB_DEVICE(USB_VENDOR_ID_TURBOX,
USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
+ /* Panasonic panels */
+ { .driver_data = MT_CLS_PANASONIC,
+ HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC,
+ USB_DEVICE_ID_PANABOARD_UBT780) },
+ { .driver_data = MT_CLS_PANASONIC,
+ HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC,
+ USB_DEVICE_ID_PANABOARD_UBT880) },
+
/* PenMount panels */
{ .driver_data = MT_CLS_CONFIDENCE,
HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
OpenPOWER on IntegriCloud