Skip to content

Commit

Permalink
HID: multitouch: add support of Panasonic multitouch panels
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis Kovalev authored and Jiri Kosina committed Feb 21, 2012
1 parent 847672c commit 2258e86
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ config HID_MULTITOUCH
- LG Display panels (Dell ST2220Tc)
- Lumio CrystalTouch panels
- MosArt dual-touch panels
- Panasonic multitouch panels
- PenMount dual touch panels
- Perixx Peripad 701 touchpad
- PixArt optical touch screen
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC, USB_DEVICE_ID_PANABOARD_UBT780) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PANASONIC, USB_DEVICE_ID_PANABOARD_UBT880) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_PCI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN) },
Expand Down
6 changes: 5 additions & 1 deletion drivers/hid/hid-ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011

#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155

#define USB_VENDOR_ID_AFATECH 0x15a4
Expand Down Expand Up @@ -565,6 +565,10 @@
#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000

#define USB_VENDOR_ID_PANASONIC 0x04da
#define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
#define USB_DEVICE_ID_PANABOARD_UBT880 0x104d

#define USB_VENDOR_ID_PANJIT 0x134c

#define USB_VENDOR_ID_PANTHERLORD 0x0810
Expand Down
19 changes: 15 additions & 4 deletions drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 },

{ }
};
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2258e86

Please sign in to comment.