linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: add support for PenMount dual-touch panel
@ 2011-04-20  9:19 PenMount
  2011-04-20  9:47 ` Henrik Rydberg
       [not found] ` <201104201054.36974.dmitry.torokhov@gmail.com>
  0 siblings, 2 replies; 23+ messages in thread
From: PenMount @ 2011-04-20  9:19 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina
  Cc: penmount.touch, PenMount

This patch adds PenMount support to hid-multitouch.
A new class MT_CLS_CONFIDENCE_SERIAL_MODE is defined for PenMount,
since it uses HID_DG_CONFIDENCE as the valid flag.
A new quirk MT_QUIRK_SERIAL_REPORT_MODE is defined,
since PenMount uses serial reporting mode and there is no
HID_DG_CONTACTCOUNT usage in it's report descriptor.

Signed-off-by: PenMount <salt@salt.com.tw>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/Kconfig          |    1 +
 drivers/hid/hid-core.c       |    1 +
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |   14 ++++++++++++++
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 996ae3a..8058cf1 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -313,6 +313,7 @@ config HID_MULTITOUCH
 	  - Cypress TrueTouch panels
 	  - Hanvon dual touch panels
 	  - IrTouch Infrared USB panels
+	  - PenMount dual touch panels
 	  - Pixcir dual touch panels
 	  - 'Sensing Win7-TwoFinger' panel by GeneralTouch
           - eGalax dual-touch panels, including the
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c3d6626..6e31b9f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d485894..a4d0505 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -487,6 +487,9 @@
 #define USB_VENDOR_ID_PETALYNX		0x18b1
 #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
 
+#define USB_VENDOR_ID_PENMOUNT		0x14e1
+#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
+
 #define USB_VENDOR_ID_PHILIPS		0x0471
 #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
 
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 0175f85..c88d96d 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -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_SERIAL_REPORT_MODE	(1 << 7)
 
 struct mt_slot {
 	__s32 x, y, p, w, h;
@@ -89,6 +90,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
+#define MT_CLS_CONFIDENCE_SERIAL_MODE		8
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -156,6 +158,9 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
+	{ .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
+			MT_QUIRK_SERIAL_REPORT_MODE },
 
 	{ }
 };
@@ -196,6 +201,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	struct mt_class *cls = td->mtclass;
 	__s32 quirks = cls->quirks;
 
+	if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
+		(!td->last_field_index))
+		td->last_field_index = field->report->maxfield - 1;
+
 	switch (usage->hid & HID_USAGE_PAGE) {
 
 	case HID_UP_GENDESK:
@@ -585,6 +594,11 @@ static const struct hid_device_id mt_devices[] = {
 		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
 
+	/* PenMount panels */
+	{  .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
+		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
+			USB_DEVICE_ID_PENMOUNT_PCI) },
+
 	/* PixCir-based panels */
 	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
 		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-20  9:19 PenMount
@ 2011-04-20  9:47 ` Henrik Rydberg
  2011-04-20  9:54   ` Benjamin Tissoires
       [not found] ` <201104201054.36974.dmitry.torokhov@gmail.com>
  1 sibling, 1 reply; 23+ messages in thread
From: Henrik Rydberg @ 2011-04-20  9:47 UTC (permalink / raw)
  To: PenMount
  Cc: Dmitry Torokhov, Benjamin Tissoires, Jiri Kosina, Stephane Chatty,
	linux-input, linux-kernel, PenMount

Hi,

thanks for the patch. Please find comments inline.

On Wed, Apr 20, 2011 at 05:19:15PM +0800, PenMount wrote:
> This patch adds PenMount support to hid-multitouch.
> A new class MT_CLS_CONFIDENCE_SERIAL_MODE is defined for PenMount,
> since it uses HID_DG_CONFIDENCE as the valid flag.
> A new quirk MT_QUIRK_SERIAL_REPORT_MODE is defined,
> since PenMount uses serial reporting mode and there is no
> HID_DG_CONTACTCOUNT usage in it's report descriptor.
> 
> Signed-off-by: PenMount <salt@salt.com.tw>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> ---
>  drivers/hid/Kconfig          |    1 +
>  drivers/hid/hid-core.c       |    1 +
>  drivers/hid/hid-ids.h        |    3 +++
>  drivers/hid/hid-multitouch.c |   14 ++++++++++++++
>  4 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 996ae3a..8058cf1 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -313,6 +313,7 @@ config HID_MULTITOUCH
>  	  - Cypress TrueTouch panels
>  	  - Hanvon dual touch panels
>  	  - IrTouch Infrared USB panels
> +	  - PenMount dual touch panels
>  	  - Pixcir dual touch panels
>  	  - 'Sensing Win7-TwoFinger' panel by GeneralTouch
>            - eGalax dual-touch panels, including the
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index c3d6626..6e31b9f 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index d485894..a4d0505 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -487,6 +487,9 @@
>  #define USB_VENDOR_ID_PETALYNX		0x18b1
>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
>  
> +#define USB_VENDOR_ID_PENMOUNT		0x14e1
> +#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
> +
>  #define USB_VENDOR_ID_PHILIPS		0x0471
>  #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
>  
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 0175f85..c88d96d 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -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_SERIAL_REPORT_MODE	(1 << 7)
>  
>  struct mt_slot {
>  	__s32 x, y, p, w, h;
> @@ -89,6 +90,7 @@ struct mt_class {
>  #define MT_CLS_EGALAX				5
>  #define MT_CLS_STANTUM				6
>  #define MT_CLS_3M				7
> +#define MT_CLS_CONFIDENCE_SERIAL_MODE		8
>  
>  #define MT_DEFAULT_MAXCONTACT	10
>  
> @@ -156,6 +158,9 @@ struct mt_class mt_classes[] = {
>  		.sn_move = 2048,
>  		.sn_width = 128,
>  		.sn_height = 128 },
> +	{ .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
> +		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
> +			MT_QUIRK_SERIAL_REPORT_MODE },
>  
>  	{ }
>  };
> @@ -196,6 +201,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
>  	struct mt_class *cls = td->mtclass;
>  	__s32 quirks = cls->quirks;
>  
> +	if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
> +		(!td->last_field_index))
> +		td->last_field_index = field->report->maxfield - 1;
> +

Are the events not emitted automatically per touch, if the lines above are omitted?

>  	switch (usage->hid & HID_USAGE_PAGE) {
>  
>  	case HID_UP_GENDESK:
> @@ -585,6 +594,11 @@ static const struct hid_device_id mt_devices[] = {
>  		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>  			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>  
> +	/* PenMount panels */
> +	{  .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
> +		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
> +			USB_DEVICE_ID_PENMOUNT_PCI) },
> +
>  	/* PixCir-based panels */
>  	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>  		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
> -- 
> 1.7.4.1
> 

Benjamin: Since field->index == 0 is in use, it seems the driver could
execute event emission wrongly under some circumstances (when
last_field_index == 0). Is that related to the reason for the quirk in
this patch?

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-20  9:47 ` Henrik Rydberg
@ 2011-04-20  9:54   ` Benjamin Tissoires
  2011-04-20 10:07     ` Henrik Rydberg
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-20  9:54 UTC (permalink / raw)
  To: Henrik Rydberg, Richard Nauber
  Cc: PenMount, Dmitry Torokhov, Jiri Kosina, Stephane Chatty,
	linux-input, linux-kernel, PenMount

[-- Attachment #1: Type: text/plain, Size: 12274 bytes --]

Hi Henrik,



On Wed, Apr 20, 2011 at 11:47, Henrik Rydberg <rydberg@euromail.se> wrote:
> Hi,
>
> thanks for the patch. Please find comments inline.
>
> On Wed, Apr 20, 2011 at 05:19:15PM +0800, PenMount wrote:
>> This patch adds PenMount support to hid-multitouch.
>> A new class MT_CLS_CONFIDENCE_SERIAL_MODE is defined for PenMount,
>> since it uses HID_DG_CONFIDENCE as the valid flag.
>> A new quirk MT_QUIRK_SERIAL_REPORT_MODE is defined,
>> since PenMount uses serial reporting mode and there is no
>> HID_DG_CONTACTCOUNT usage in it's report descriptor.
>>
>> Signed-off-by: PenMount <salt@salt.com.tw>
>> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
>> ---
>>  drivers/hid/Kconfig          |    1 +
>>  drivers/hid/hid-core.c       |    1 +
>>  drivers/hid/hid-ids.h        |    3 +++
>>  drivers/hid/hid-multitouch.c |   14 ++++++++++++++
>>  4 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
>> index 996ae3a..8058cf1 100644
>> --- a/drivers/hid/Kconfig
>> +++ b/drivers/hid/Kconfig
>> @@ -313,6 +313,7 @@ config HID_MULTITOUCH
>>         - Cypress TrueTouch panels
>>         - Hanvon dual touch panels
>>         - IrTouch Infrared USB panels
>> +       - PenMount dual touch panels
>>         - Pixcir dual touch panels
>>         - 'Sensing Win7-TwoFinger' panel by GeneralTouch
>>            - eGalax dual-touch panels, including the
>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>> index c3d6626..6e31b9f 100644
>> --- a/drivers/hid/hid-core.c
>> +++ b/drivers/hid/hid-core.c
>> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>>       { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
>> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
>> index d485894..a4d0505 100644
>> --- a/drivers/hid/hid-ids.h
>> +++ b/drivers/hid/hid-ids.h
>> @@ -487,6 +487,9 @@
>>  #define USB_VENDOR_ID_PETALYNX               0x18b1
>>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037
>>
>> +#define USB_VENDOR_ID_PENMOUNT               0x14e1
>> +#define USB_DEVICE_ID_PENMOUNT_PCI   0x3500
>> +
>>  #define USB_VENDOR_ID_PHILIPS                0x0471
>>  #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
>>
>> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
>> index 0175f85..c88d96d 100644
>> --- a/drivers/hid/hid-multitouch.c
>> +++ b/drivers/hid/hid-multitouch.c
>> @@ -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_SERIAL_REPORT_MODE  (1 << 7)
>>
>>  struct mt_slot {
>>       __s32 x, y, p, w, h;
>> @@ -89,6 +90,7 @@ struct mt_class {
>>  #define MT_CLS_EGALAX                                5
>>  #define MT_CLS_STANTUM                               6
>>  #define MT_CLS_3M                            7
>> +#define MT_CLS_CONFIDENCE_SERIAL_MODE                8
>>
>>  #define MT_DEFAULT_MAXCONTACT        10
>>
>> @@ -156,6 +158,9 @@ struct mt_class mt_classes[] = {
>>               .sn_move = 2048,
>>               .sn_width = 128,
>>               .sn_height = 128 },
>> +     { .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
>> +             .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
>> +                     MT_QUIRK_SERIAL_REPORT_MODE },
>>
>>       { }
>>  };
>> @@ -196,6 +201,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
>>       struct mt_class *cls = td->mtclass;
>>       __s32 quirks = cls->quirks;
>>
>> +     if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
>> +             (!td->last_field_index))
>> +             td->last_field_index = field->report->maxfield - 1;
>> +
>
> Are the events not emitted automatically per touch, if the lines above are omitted?
>
>>       switch (usage->hid & HID_USAGE_PAGE) {
>>
>>       case HID_UP_GENDESK:
>> @@ -585,6 +594,11 @@ static const struct hid_device_id mt_devices[] = {
>>               HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>>                       USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>>
>> +     /* PenMount panels */
>> +     {  .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
>> +             HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
>> +                     USB_DEVICE_ID_PENMOUNT_PCI) },
>> +
>>       /* PixCir-based panels */
>>       { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>>               HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
>> --
>> 1.7.4.1
>>
>
> Benjamin: Since field->index == 0 is in use, it seems the driver could
> execute event emission wrongly under some circumstances (when
> last_field_index == 0). Is that related to the reason for the quirk in
> this patch?

In fact, I have a second patch just on top of this one. It has been
tested by Ryan with PenMount devices.
I was waiting for Penmount to be included first as it does not impact
any other drivers.

I inline the code here, but my gmail client will destroy tabs (so I
attached it too)....

Can you test it against 3M?

Richard, can you test it (after applying the PenMount patch) too?

Thanks,
Benjamin

>From ac6b68d27b70e91846f2179d15804144dfab8bc1 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Date: Tue, 19 Apr 2011 11:49:44 +0200
Subject: [PATCH] HID: hid-multitouch: refactor last_field_index

the current implementation requires the devices to report
HID_DG_CONTACTCOUNT to set the last_field_index value.
However, devices reporting in serial mode (DWAV and PenMount)
do not send this field.
Other devices (3M) add other fields in the reports descriptor
that are not multitouch related at the end, thus the need to
add a special case in the default case when handling events.

A first work around has been set up but with PenMount devices,
we have reached the limit.

The idea is to calculate the last_field_index by relying only on
multitouch fields the device send. This allows us to remove
the handling of non-multitouch events in hid-multitouch, and
guarantee that the function mt_emit_event is always called.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/hid-multitouch.c |   37 +++++++++++++++----------------------
 1 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 5d4ba79..51b5d27 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -50,7 +50,6 @@ 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_SERIAL_REPORT_MODE	(1 << 7)

 struct mt_slot {
 	__s32 x, y, p, w, h;
@@ -90,7 +89,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
-#define MT_CLS_CONFIDENCE_SERIAL_MODE		8
+#define MT_CLS_CONFIDENCE			8

 #define MT_DEFAULT_MAXCONTACT	10

@@ -158,9 +157,8 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
-	{ .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
-		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
-			MT_QUIRK_SERIAL_REPORT_MODE },
+	{ .name = MT_CLS_CONFIDENCE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },

 	{ }
 };
@@ -201,10 +199,6 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 	struct mt_class *cls = td->mtclass;
 	__s32 quirks = cls->quirks;

-	if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
-		(!td->last_field_index))
-		td->last_field_index = field->report->maxfield - 1;
-
 	switch (usage->hid & HID_USAGE_PAGE) {

 	case HID_UP_GENDESK:
@@ -219,6 +213,7 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_X, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_GD_Y:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -230,6 +225,7 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_Y, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		}
 		return 0;
@@ -238,18 +234,22 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 		switch (usage->hid) {
 		case HID_DG_INRANGE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONFIDENCE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPSWITCH:
 			hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
 			input_set_capability(hi->input, EV_KEY, BTN_TOUCH);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTID:
 			input_mt_init_slots(hi->input, td->maxcontacts);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_WIDTH:
 			hid_map_usage(hi, usage, bit, max,
@@ -257,6 +257,7 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field,
 				cls->sn_width);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_HEIGHT:
 			hid_map_usage(hi, usage, bit, max,
@@ -266,6 +267,7 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 			input_set_abs_params(hi->input,
 					ABS_MT_ORIENTATION, 0, 1, 0, 0);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPPRESSURE:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -278,13 +280,15 @@ static int mt_input_mapping(struct hid_device
*hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_PRESSURE, field,
 				cls->sn_pressure);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTCOUNT:
-			td->last_field_index = field->report->maxfield - 1;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTMAX:
 			/* we don't set td->last_slot_field as contactcount and
 			 * contact max are global to the report */
+			td->last_field_index = field->index;
 			return -1;
 		}
 		/* let hid-input decide for the others */
@@ -433,23 +437,12 @@ static int mt_event(struct hid_device *hid,
struct hid_field *field,
 			break;

 		default:
-			if (td->last_field_index
-				&& field->index == td->last_field_index)
-				/* we reach here when the last field in the
-				 * report is not related to multitouch.
-				 * This is not good. As a temporary solution,
-				 * we trigger our mt event completion and
-				 * ignore the field.
-				 */
-				break;
 			/* fallback to the generic hidinput handling */
 			return 0;
 		}

 		if (usage->hid == td->last_slot_field) {
 			mt_complete_slot(td);
-			if (!td->last_field_index)
-				mt_emit_event(td, field->hidinput->input);
 		}

 		if (field->index == td->last_field_index
@@ -595,7 +588,7 @@ static const struct hid_device_id mt_devices[] = {
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },

 	/* PenMount panels */
-	{ .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
+	{ .driver_data = MT_CLS_CONFIDENCE,
 		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
 			USB_DEVICE_ID_PENMOUNT_PCI) },

-- 
1.7.4.2

[-- Attachment #2: 0001-HID-hid-multitouch-refactor-last_field_index.patch --]
[-- Type: text/x-patch, Size: 6269 bytes --]

From ac6b68d27b70e91846f2179d15804144dfab8bc1 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Date: Tue, 19 Apr 2011 11:49:44 +0200
Subject: [PATCH] HID: hid-multitouch: refactor last_field_index

the current implementation requires the devices to report
HID_DG_CONTACTCOUNT to set the last_field_index value.
However, devices reporting in serial mode (DWAV and PenMount)
do not send this field.
Other devices (3M) add other fields in the reports descriptor
that are not multitouch related at the end, thus the need to
add a special case in the default case when handling events.

A first work around has been set up but with PenMount devices,
we have reached the limit.

The idea is to calculate the last_field_index by relying only on
multitouch fields the device send. This allows us to remove
the handling of non-multitouch events in hid-multitouch, and
guarantee that the function mt_emit_event is always called.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/hid-multitouch.c |   37 +++++++++++++++----------------------
 1 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 5d4ba79..51b5d27 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -50,7 +50,6 @@ 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_SERIAL_REPORT_MODE	(1 << 7)
 
 struct mt_slot {
 	__s32 x, y, p, w, h;
@@ -90,7 +89,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
-#define MT_CLS_CONFIDENCE_SERIAL_MODE		8
+#define MT_CLS_CONFIDENCE			8
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -158,9 +157,8 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
-	{ .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
-		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
-			MT_QUIRK_SERIAL_REPORT_MODE },
+	{ .name = MT_CLS_CONFIDENCE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
 
 	{ }
 };
@@ -201,10 +199,6 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	struct mt_class *cls = td->mtclass;
 	__s32 quirks = cls->quirks;
 
-	if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
-		(!td->last_field_index))
-		td->last_field_index = field->report->maxfield - 1;
-
 	switch (usage->hid & HID_USAGE_PAGE) {
 
 	case HID_UP_GENDESK:
@@ -219,6 +213,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_X, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_GD_Y:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -230,6 +225,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_Y, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		}
 		return 0;
@@ -238,18 +234,22 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		switch (usage->hid) {
 		case HID_DG_INRANGE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONFIDENCE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPSWITCH:
 			hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
 			input_set_capability(hi->input, EV_KEY, BTN_TOUCH);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTID:
 			input_mt_init_slots(hi->input, td->maxcontacts);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_WIDTH:
 			hid_map_usage(hi, usage, bit, max,
@@ -257,6 +257,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field,
 				cls->sn_width);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_HEIGHT:
 			hid_map_usage(hi, usage, bit, max,
@@ -266,6 +267,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			input_set_abs_params(hi->input,
 					ABS_MT_ORIENTATION, 0, 1, 0, 0);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPPRESSURE:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -278,13 +280,15 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_PRESSURE, field,
 				cls->sn_pressure);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTCOUNT:
-			td->last_field_index = field->report->maxfield - 1;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTMAX:
 			/* we don't set td->last_slot_field as contactcount and
 			 * contact max are global to the report */
+			td->last_field_index = field->index;
 			return -1;
 		}
 		/* let hid-input decide for the others */
@@ -433,23 +437,12 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
 			break;
 
 		default:
-			if (td->last_field_index
-				&& field->index == td->last_field_index)
-				/* we reach here when the last field in the
-				 * report is not related to multitouch.
-				 * This is not good. As a temporary solution,
-				 * we trigger our mt event completion and
-				 * ignore the field.
-				 */
-				break;
 			/* fallback to the generic hidinput handling */
 			return 0;
 		}
 
 		if (usage->hid == td->last_slot_field) {
 			mt_complete_slot(td);
-			if (!td->last_field_index)
-				mt_emit_event(td, field->hidinput->input);
 		}
 
 		if (field->index == td->last_field_index
@@ -595,7 +588,7 @@ static const struct hid_device_id mt_devices[] = {
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
 
 	/* PenMount panels */
-	{ .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
+	{ .driver_data = MT_CLS_CONFIDENCE,
 		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
 			USB_DEVICE_ID_PENMOUNT_PCI) },
 
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-20  9:54   ` Benjamin Tissoires
@ 2011-04-20 10:07     ` Henrik Rydberg
  2011-04-21  9:17       ` Jiri Kosina
  0 siblings, 1 reply; 23+ messages in thread
From: Henrik Rydberg @ 2011-04-20 10:07 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Richard Nauber, PenMount, Dmitry Torokhov, Jiri Kosina,
	Stephane Chatty, linux-input, linux-kernel, PenMount

> > Benjamin: Since field->index == 0 is in use, it seems the driver could
> > execute event emission wrongly under some circumstances (when
> > last_field_index == 0). Is that related to the reason for the quirk in
> > this patch?
> 
> In fact, I have a second patch just on top of this one. It has been
> tested by Ryan with PenMount devices.

Great, and good timing. :-)

> I was waiting for Penmount to be included first as it does not impact
> any other drivers.

I would prefer the opposite order, since it is cleaner and means one
less device to test for the major change.

> 
> I inline the code here, but my gmail client will destroy tabs (so I
> attached it too)....
> 
> Can you test it against 3M?

I will test it against 3M and egalax. Thanks!

Henrik

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
       [not found]   ` <BANLkTikwjPc9w-HJLitBYG1tdix1U=4ckg@mail.gmail.com>
@ 2011-04-21  6:58     ` Jiri Kosina
  0 siblings, 0 replies; 23+ messages in thread
From: Jiri Kosina @ 2011-04-21  6:58 UTC (permalink / raw)
  To: PenMount salt
  Cc: Dmitry Torokhov, Benjamin Tissoires, Stephane Chatty, linux-input,
	linux-kernel, PenMount

On Thu, 21 Apr 2011, PenMount salt wrote:

> We are sorry, this is the first time we summit patches, and don't know 
> the rules well yet. Is there a proper way we can correct this?

Please just resubmit the patch with modified From: and Signed-off-by: 
lines so that they use real names.

See Documentation/SubmittingPatches, namely chapter 12 for details.

Thanks a lot for your work on supporting the new deivce.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] HID: add support for PenMount dual-touch panel
@ 2011-04-21  7:31 John Sung
  0 siblings, 0 replies; 23+ messages in thread
From: John Sung @ 2011-04-21  7:31 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina
  Cc: penmount.touch

This patch adds PenMount support to hid-multitouch.
A new class MT_CLS_CONFIDENCE_SERIAL_MODE is defined for PenMount,
since it uses HID_DG_CONFIDENCE as the valid flag.
A new quirk MT_QUIRK_SERIAL_REPORT_MODE is defined,
since PenMount uses serial reporting mode and there is no
HID_DG_CONTACTCOUNT usage in it's report descriptor.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/Kconfig          |    1 +
 drivers/hid/hid-core.c       |    1 +
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |   14 ++++++++++++++
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 996ae3a..8058cf1 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -313,6 +313,7 @@ config HID_MULTITOUCH
 	  - Cypress TrueTouch panels
 	  - Hanvon dual touch panels
 	  - IrTouch Infrared USB panels
+	  - PenMount dual touch panels
 	  - Pixcir dual touch panels
 	  - 'Sensing Win7-TwoFinger' panel by GeneralTouch
           - eGalax dual-touch panels, including the
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c3d6626..6e31b9f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d485894..a4d0505 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -487,6 +487,9 @@
 #define USB_VENDOR_ID_PETALYNX		0x18b1
 #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
 
+#define USB_VENDOR_ID_PENMOUNT		0x14e1
+#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
+
 #define USB_VENDOR_ID_PHILIPS		0x0471
 #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
 
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 0175f85..c88d96d 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -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_SERIAL_REPORT_MODE	(1 << 7)
 
 struct mt_slot {
 	__s32 x, y, p, w, h;
@@ -89,6 +90,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
+#define MT_CLS_CONFIDENCE_SERIAL_MODE		8
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -156,6 +158,9 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
+	{ .name = MT_CLS_CONFIDENCE_SERIAL_MODE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
+			MT_QUIRK_SERIAL_REPORT_MODE },
 
 	{ }
 };
@@ -196,6 +201,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	struct mt_class *cls = td->mtclass;
 	__s32 quirks = cls->quirks;
 
+	if ((quirks & MT_QUIRK_SERIAL_REPORT_MODE) &&
+		(!td->last_field_index))
+		td->last_field_index = field->report->maxfield - 1;
+
 	switch (usage->hid & HID_USAGE_PAGE) {
 
 	case HID_UP_GENDESK:
@@ -585,6 +594,11 @@ static const struct hid_device_id mt_devices[] = {
 		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
 
+	/* PenMount panels */
+	{  .driver_data = MT_CLS_CONFIDENCE_SERIAL_MODE,
+		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
+			USB_DEVICE_ID_PENMOUNT_PCI) },
+
 	/* PixCir-based panels */
 	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
 		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-20 10:07     ` Henrik Rydberg
@ 2011-04-21  9:17       ` Jiri Kosina
  2011-04-21 10:53         ` Benjamin Tissoires
  0 siblings, 1 reply; 23+ messages in thread
From: Jiri Kosina @ 2011-04-21  9:17 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Benjamin Tissoires, Richard Nauber, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, linux-kernel, PenMount

On Wed, 20 Apr 2011, Henrik Rydberg wrote:

> > In fact, I have a second patch just on top of this one. It has been
> > tested by Ryan with PenMount devices.
> 
> Great, and good timing. :-)
> 
> > I was waiting for Penmount to be included first as it does not impact
> > any other drivers.
> 
> I would prefer the opposite order, since it is cleaner and means one
> less device to test for the major change.

I agree with Henrik on this.

Once you are done with testing the last_field_index change, it'd be great 
if you could respin the patches so that the first one perfoms this change, 
and the second one adds PenMount support on top of it.

I'll then apply it. Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-21  9:17       ` Jiri Kosina
@ 2011-04-21 10:53         ` Benjamin Tissoires
  2011-04-21 11:58           ` Henrik Rydberg
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 10:53 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Henrik Rydberg, Richard Nauber, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, linux-kernel, PenMount

On Thu, Apr 21, 2011 at 11:17, Jiri Kosina <jkosina@suse.cz> wrote:
> On Wed, 20 Apr 2011, Henrik Rydberg wrote:
>
>> > In fact, I have a second patch just on top of this one. It has been
>> > tested by Ryan with PenMount devices.
>>
>> Great, and good timing. :-)
>>
>> > I was waiting for Penmount to be included first as it does not impact
>> > any other drivers.
>>
>> I would prefer the opposite order, since it is cleaner and means one
>> less device to test for the major change.
>
> I agree with Henrik on this.
>
> Once you are done with testing the last_field_index change, it'd be great
> if you could respin the patches so that the first one perfoms this change,
> and the second one adds PenMount support on top of it.
>
> I'll then apply it. Thanks,

Hi Jiri,

I'll do that as soon as Henrik tells me it is working.

Cheers,
Benjamin

>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-21 10:53         ` Benjamin Tissoires
@ 2011-04-21 11:58           ` Henrik Rydberg
  2011-04-21 12:05             ` Benjamin Tissoires
  0 siblings, 1 reply; 23+ messages in thread
From: Henrik Rydberg @ 2011-04-21 11:58 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Jiri Kosina, Richard Nauber, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, linux-kernel, PenMount

> > Once you are done with testing the last_field_index change, it'd be great
> > if you could respin the patches so that the first one perfoms this change,
> > and the second one adds PenMount support on top of it.
> >
> > I'll then apply it. Thanks,
> 
> Hi Jiri,
> 
> I'll do that as soon as Henrik tells me it is working.

The 3M (0596:0502) and eGalax (0eef:720c) seem to work as expected.

Cheers,
Henrik

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-21 11:58           ` Henrik Rydberg
@ 2011-04-21 12:05             ` Benjamin Tissoires
  2011-04-28 14:16               ` Richard Nauber
  0 siblings, 1 reply; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 12:05 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Jiri Kosina, Richard Nauber, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, linux-kernel, PenMount

On Thu, Apr 21, 2011 at 13:58, Henrik Rydberg <rydberg@euromail.se> wrote:
>> > Once you are done with testing the last_field_index change, it'd be great
>> > if you could respin the patches so that the first one perfoms this change,
>> > and the second one adds PenMount support on top of it.
>> >
>> > I'll then apply it. Thanks,
>>
>> Hi Jiri,
>>
>> I'll do that as soon as Henrik tells me it is working.
>
> The 3M (0596:0502) and eGalax (0eef:720c) seem to work as expected.
>

Thanks a lot Henrik.

I'll respin the patches right now!

Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 0/2] Support for PenMount devices
@ 2011-04-21 12:15 Benjamin Tissoires
  2011-04-21 12:15 ` [PATCH 1/2] HID: hid-multitouch: refactor last_field_index Benjamin Tissoires
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 12:15 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina,
	Stephane Chatty <ch>

Hi Guys,

here is the respin of the 2 patches sent before on the list.
The first one is a rework of the last_field_index, and the second actually adds PenMount devices.

Cheers,
Benjamin



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 1/2] HID: hid-multitouch: refactor last_field_index
  2011-04-21 12:15 [PATCH 0/2] Support for PenMount devices Benjamin Tissoires
@ 2011-04-21 12:15 ` Benjamin Tissoires
  2011-04-21 12:45   ` Henrik Rydberg
  2011-04-21 12:16 ` [PATCH 2/2] HID: add support for PenMount dual-touch panel Benjamin Tissoires
       [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
  2 siblings, 1 reply; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 12:15 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina,
	Stephane Chatty <ch>

the current implementation requires the devices to report
HID_DG_CONTACTCOUNT to set the last_field_index value.
However, devices reporting in serial mode (DWAV and PenMount)
do not send this field.
Other devices (3M) add other fields in the reports descriptor
that are not multitouch related at the end, thus the need to
add a special case in the default case when handling events.

A first work around has been set up but with PenMount devices,
we have reached the limit.

The idea is to calculate the last_field_index by relying only on
multitouch fields the device send. This allows us to remove
the handling of non-multitouch events in hid-multitouch, and
guarantee that the function mt_emit_event is always called.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/hid-multitouch.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 0175f85..6005e78 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -210,6 +210,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_X, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_GD_Y:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -221,6 +222,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			/* touchscreen emulation */
 			set_abs(hi->input, ABS_Y, field, cls->sn_move);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		}
 		return 0;
@@ -229,18 +231,22 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		switch (usage->hid) {
 		case HID_DG_INRANGE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONFIDENCE:
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPSWITCH:
 			hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
 			input_set_capability(hi->input, EV_KEY, BTN_TOUCH);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTID:
 			input_mt_init_slots(hi->input, td->maxcontacts);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_WIDTH:
 			hid_map_usage(hi, usage, bit, max,
@@ -248,6 +254,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field,
 				cls->sn_width);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_HEIGHT:
 			hid_map_usage(hi, usage, bit, max,
@@ -257,6 +264,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			input_set_abs_params(hi->input,
 					ABS_MT_ORIENTATION, 0, 1, 0, 0);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_TIPPRESSURE:
 			if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
@@ -269,13 +277,15 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			set_abs(hi->input, ABS_PRESSURE, field,
 				cls->sn_pressure);
 			td->last_slot_field = usage->hid;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTCOUNT:
-			td->last_field_index = field->report->maxfield - 1;
+			td->last_field_index = field->index;
 			return 1;
 		case HID_DG_CONTACTMAX:
 			/* we don't set td->last_slot_field as contactcount and
 			 * contact max are global to the report */
+			td->last_field_index = field->index;
 			return -1;
 		}
 		/* let hid-input decide for the others */
@@ -424,23 +434,12 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
 			break;
 
 		default:
-			if (td->last_field_index
-				&& field->index == td->last_field_index)
-				/* we reach here when the last field in the
-				 * report is not related to multitouch.
-				 * This is not good. As a temporary solution,
-				 * we trigger our mt event completion and
-				 * ignore the field.
-				 */
-				break;
 			/* fallback to the generic hidinput handling */
 			return 0;
 		}
 
 		if (usage->hid == td->last_slot_field) {
 			mt_complete_slot(td);
-			if (!td->last_field_index)
-				mt_emit_event(td, field->hidinput->input);
 		}
 
 		if (field->index == td->last_field_index
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 2/2] HID: add support for PenMount dual-touch panel
  2011-04-21 12:15 [PATCH 0/2] Support for PenMount devices Benjamin Tissoires
  2011-04-21 12:15 ` [PATCH 1/2] HID: hid-multitouch: refactor last_field_index Benjamin Tissoires
@ 2011-04-21 12:16 ` Benjamin Tissoires
       [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
  2 siblings, 0 replies; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 12:16 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina,
	Stephane Chatty <ch>

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
 drivers/hid/hid-core.c       |    1 +
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |    8 ++++++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c3d6626..6e31b9f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d485894..252aeba 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -484,6 +484,9 @@
 #define USB_VENDOR_ID_PANTHERLORD	0x0810
 #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK	0x0001
 
+#define USB_VENDOR_ID_PENMOUNT		0x14e1
+#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
+
 #define USB_VENDOR_ID_PETALYNX		0x18b1
 #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
 
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 6005e78..51b5d27 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -89,6 +89,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
+#define MT_CLS_CONFIDENCE			8
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
+	{ .name = MT_CLS_CONFIDENCE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
 
 	{ }
 };
@@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
 		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
 
+	/* PenMount panels */
+	{ .driver_data = MT_CLS_CONFIDENCE,
+		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
+			USB_DEVICE_ID_PENMOUNT_PCI) },
+
 	/* PixCir-based panels */
 	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
 		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/2] HID: add support for PenMount dual-touch panel
       [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
@ 2011-04-21 12:18   ` Jiri Kosina
  2011-04-21 12:19     ` Benjamin Tissoires
  2011-04-21 12:45   ` Henrik Rydberg
  2011-04-21 14:21   ` [PATCH] " Benjamin Tissoires
  2 siblings, 1 reply; 23+ messages in thread
From: Jiri Kosina @ 2011-04-21 12:18 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Dmitry Torokhov, Henrik Rydberg, Stephane Chatty, PenMount,
	linux-input, linux-kernel

On Thu, 21 Apr 2011, Benjamin Tissoires wrote:

> Signed-off-by: John Sung <penmount.touch@gmail.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>

Hi Benjamin,

thanks for respinning the pathes.

This one is though missing

- changelog
- From: line (I believe we'd like to keep John's authorship)

Thanks.

> ---
>  drivers/hid/hid-core.c       |    1 +
>  drivers/hid/hid-ids.h        |    3 +++
>  drivers/hid/hid-multitouch.c |    8 ++++++++
>  3 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index c3d6626..6e31b9f 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index d485894..252aeba 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -484,6 +484,9 @@
>  #define USB_VENDOR_ID_PANTHERLORD	0x0810
>  #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK	0x0001
>  
> +#define USB_VENDOR_ID_PENMOUNT		0x14e1
> +#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
> +
>  #define USB_VENDOR_ID_PETALYNX		0x18b1
>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
>  
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 6005e78..51b5d27 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -89,6 +89,7 @@ struct mt_class {
>  #define MT_CLS_EGALAX				5
>  #define MT_CLS_STANTUM				6
>  #define MT_CLS_3M				7
> +#define MT_CLS_CONFIDENCE			8
>  
>  #define MT_DEFAULT_MAXCONTACT	10
>  
> @@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
>  		.sn_move = 2048,
>  		.sn_width = 128,
>  		.sn_height = 128 },
> +	{ .name = MT_CLS_CONFIDENCE,
> +		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
>  
>  	{ }
>  };
> @@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
>  		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>  			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>  
> +	/* PenMount panels */
> +	{ .driver_data = MT_CLS_CONFIDENCE,
> +		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
> +			USB_DEVICE_ID_PENMOUNT_PCI) },
> +
>  	/* PixCir-based panels */
>  	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>  		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
> -- 
> 1.7.4.2
> 

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/2] HID: add support for PenMount dual-touch panel
  2011-04-21 12:18   ` Jiri Kosina
@ 2011-04-21 12:19     ` Benjamin Tissoires
  0 siblings, 0 replies; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 12:19 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Dmitry Torokhov, Henrik Rydberg, Stephane Chatty, PenMount,
	linux-input, linux-kernel

On Thu, Apr 21, 2011 at 14:18, Jiri Kosina <jkosina@suse.cz> wrote:
> On Thu, 21 Apr 2011, Benjamin Tissoires wrote:
>
>> Signed-off-by: John Sung <penmount.touch@gmail.com>
>> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
>
> Hi Benjamin,
>
> thanks for respinning the pathes.
>
> This one is though missing
>
> - changelog
> - From: line (I believe we'd like to keep John's authorship)

Yep, sorry for that, I just seen it in my triple check after sending
it (grrr...). Do you want me to resend it, or we wait for John to do
it?

Cheers,
Benjamin

>
> Thanks.
>
>> ---
>>  drivers/hid/hid-core.c       |    1 +
>>  drivers/hid/hid-ids.h        |    3 +++
>>  drivers/hid/hid-multitouch.c |    8 ++++++++
>>  3 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>> index c3d6626..6e31b9f 100644
>> --- a/drivers/hid/hid-core.c
>> +++ b/drivers/hid/hid-core.c
>> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>>       { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
>> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
>> index d485894..252aeba 100644
>> --- a/drivers/hid/hid-ids.h
>> +++ b/drivers/hid/hid-ids.h
>> @@ -484,6 +484,9 @@
>>  #define USB_VENDOR_ID_PANTHERLORD    0x0810
>>  #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK  0x0001
>>
>> +#define USB_VENDOR_ID_PENMOUNT               0x14e1
>> +#define USB_DEVICE_ID_PENMOUNT_PCI   0x3500
>> +
>>  #define USB_VENDOR_ID_PETALYNX               0x18b1
>>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037
>>
>> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
>> index 6005e78..51b5d27 100644
>> --- a/drivers/hid/hid-multitouch.c
>> +++ b/drivers/hid/hid-multitouch.c
>> @@ -89,6 +89,7 @@ struct mt_class {
>>  #define MT_CLS_EGALAX                                5
>>  #define MT_CLS_STANTUM                               6
>>  #define MT_CLS_3M                            7
>> +#define MT_CLS_CONFIDENCE                    8
>>
>>  #define MT_DEFAULT_MAXCONTACT        10
>>
>> @@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
>>               .sn_move = 2048,
>>               .sn_width = 128,
>>               .sn_height = 128 },
>> +     { .name = MT_CLS_CONFIDENCE,
>> +             .quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
>>
>>       { }
>>  };
>> @@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
>>               HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>>                       USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>>
>> +     /* PenMount panels */
>> +     { .driver_data = MT_CLS_CONFIDENCE,
>> +             HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
>> +                     USB_DEVICE_ID_PENMOUNT_PCI) },
>> +
>>       /* PixCir-based panels */
>>       { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>>               HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
>> --
>> 1.7.4.2
>>
>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] HID: hid-multitouch: refactor last_field_index
  2011-04-21 12:15 ` [PATCH 1/2] HID: hid-multitouch: refactor last_field_index Benjamin Tissoires
@ 2011-04-21 12:45   ` Henrik Rydberg
  2011-04-22  9:55     ` Jiri Kosina
  0 siblings, 1 reply; 23+ messages in thread
From: Henrik Rydberg @ 2011-04-21 12:45 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, PenMount,
	linux-input, linux-kernel

On Thu, Apr 21, 2011 at 02:15:59PM +0200, Benjamin Tissoires wrote:
> the current implementation requires the devices to report
> HID_DG_CONTACTCOUNT to set the last_field_index value.
> However, devices reporting in serial mode (DWAV and PenMount)
> do not send this field.
> Other devices (3M) add other fields in the reports descriptor
> that are not multitouch related at the end, thus the need to
> add a special case in the default case when handling events.
> 
> A first work around has been set up but with PenMount devices,
> we have reached the limit.
> 
> The idea is to calculate the last_field_index by relying only on
> multitouch fields the device send. This allows us to remove
> the handling of non-multitouch events in hid-multitouch, and
> guarantee that the function mt_emit_event is always called.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> ---

Reviewed-and-tested-by: Henrik Rydberg <rydberg@euromail.se>

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/2] HID: add support for PenMount dual-touch panel
       [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
  2011-04-21 12:18   ` Jiri Kosina
@ 2011-04-21 12:45   ` Henrik Rydberg
  2011-04-21 14:21   ` [PATCH] " Benjamin Tissoires
  2 siblings, 0 replies; 23+ messages in thread
From: Henrik Rydberg @ 2011-04-21 12:45 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, PenMount,
	linux-input, linux-kernel

On Thu, Apr 21, 2011 at 02:16:00PM +0200, Benjamin Tissoires wrote:
> Signed-off-by: John Sung <penmount.touch@gmail.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> ---

Acked-by: Henrik Rydberg <rydberg@euromail.se>

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] HID: add support for PenMount dual-touch panel
       [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
  2011-04-21 12:18   ` Jiri Kosina
  2011-04-21 12:45   ` Henrik Rydberg
@ 2011-04-21 14:21   ` Benjamin Tissoires
  2011-04-22  9:57     ` Jiri Kosina
  2 siblings, 1 reply; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-21 14:21 UTC (permalink / raw)
  To: Dmitry Torokhov, Henrik Rydberg, Benjamin Tissoires, Jiri Kosina,
	Stephane Chatty <ch>

From: John Sung <penmount.touch@gmail.com>

This patch adds PenMount support to hid-multitouch.
A new class MT_CLS_CONFIDENCE is defined for PenMount,
since it uses HID_DG_CONFIDENCE as the valid flag.

Signed-off-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>

---

Hi Guys,

this is the final version (I hope so).
I changed the from, restored back the Kconfig part and reintroduced the commit message.
John, I hope it's good for you.

Cheers,
Benjamin

 drivers/hid/Kconfig          |    1 +
 drivers/hid/hid-core.c       |    1 +
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |    8 ++++++++
 4 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 996ae3a..8058cf1 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -313,6 +313,7 @@ config HID_MULTITOUCH
 	  - Cypress TrueTouch panels
 	  - Hanvon dual touch panels
 	  - IrTouch Infrared USB panels
+	  - PenMount dual touch panels
 	  - Pixcir dual touch panels
 	  - 'Sensing Win7-TwoFinger' panel by GeneralTouch
           - eGalax dual-touch panels, including the
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c3d6626..6e31b9f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d485894..252aeba 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -484,6 +484,9 @@
 #define USB_VENDOR_ID_PANTHERLORD	0x0810
 #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK	0x0001
 
+#define USB_VENDOR_ID_PENMOUNT		0x14e1
+#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
+
 #define USB_VENDOR_ID_PETALYNX		0x18b1
 #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
 
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 6005e78..51b5d27 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -89,6 +89,7 @@ struct mt_class {
 #define MT_CLS_EGALAX				5
 #define MT_CLS_STANTUM				6
 #define MT_CLS_3M				7
+#define MT_CLS_CONFIDENCE			8
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
 		.sn_move = 2048,
 		.sn_width = 128,
 		.sn_height = 128 },
+	{ .name = MT_CLS_CONFIDENCE,
+		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
 
 	{ }
 };
@@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
 		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
 			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
 
+	/* PenMount panels */
+	{ .driver_data = MT_CLS_CONFIDENCE,
+		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
+			USB_DEVICE_ID_PENMOUNT_PCI) },
+
 	/* PixCir-based panels */
 	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
 		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] HID: hid-multitouch: refactor last_field_index
  2011-04-21 12:45   ` Henrik Rydberg
@ 2011-04-22  9:55     ` Jiri Kosina
  0 siblings, 0 replies; 23+ messages in thread
From: Jiri Kosina @ 2011-04-22  9:55 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Benjamin Tissoires, Dmitry Torokhov, Stephane Chatty, PenMount,
	linux-input, linux-kernel

On Thu, 21 Apr 2011, Henrik Rydberg wrote:

> > the current implementation requires the devices to report
> > HID_DG_CONTACTCOUNT to set the last_field_index value.
> > However, devices reporting in serial mode (DWAV and PenMount)
> > do not send this field.
> > Other devices (3M) add other fields in the reports descriptor
> > that are not multitouch related at the end, thus the need to
> > add a special case in the default case when handling events.
> > 
> > A first work around has been set up but with PenMount devices,
> > we have reached the limit.
> > 
> > The idea is to calculate the last_field_index by relying only on
> > multitouch fields the device send. This allows us to remove
> > the handling of non-multitouch events in hid-multitouch, and
> > guarantee that the function mt_emit_event is always called.
> > 
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> > ---
> 
> Reviewed-and-tested-by: Henrik Rydberg <rydberg@euromail.se>

Applied, thanks guys.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-21 14:21   ` [PATCH] " Benjamin Tissoires
@ 2011-04-22  9:57     ` Jiri Kosina
  2011-04-22 10:12       ` Benjamin Tissoires
  0 siblings, 1 reply; 23+ messages in thread
From: Jiri Kosina @ 2011-04-22  9:57 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Dmitry Torokhov, Henrik Rydberg, Stephane Chatty, John Sung,
	linux-input, linux-kernel

On Thu, 21 Apr 2011, Benjamin Tissoires wrote:

> From: John Sung <penmount.touch@gmail.com>
> 
> This patch adds PenMount support to hid-multitouch.
> A new class MT_CLS_CONFIDENCE is defined for PenMount,
> since it uses HID_DG_CONFIDENCE as the valid flag.
> 
> Signed-off-by: John Sung <penmount.touch@gmail.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> Acked-by: Henrik Rydberg <rydberg@euromail.se>
> 
> ---
> 
> Hi Guys,
> 
> this is the final version (I hope so).
> I changed the from, restored back the Kconfig part and reintroduced the commit message.
> John, I hope it's good for you.
> 
> Cheers,
> Benjamin
> 
>  drivers/hid/Kconfig          |    1 +
>  drivers/hid/hid-core.c       |    1 +
>  drivers/hid/hid-ids.h        |    3 +++
>  drivers/hid/hid-multitouch.c |    8 ++++++++
>  4 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 996ae3a..8058cf1 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -313,6 +313,7 @@ config HID_MULTITOUCH
>  	  - Cypress TrueTouch panels
>  	  - Hanvon dual touch panels
>  	  - IrTouch Infrared USB panels
> +	  - PenMount dual touch panels
>  	  - Pixcir dual touch panels
>  	  - 'Sensing Win7-TwoFinger' panel by GeneralTouch
>            - eGalax dual-touch panels, including the
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index c3d6626..6e31b9f 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index d485894..252aeba 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -484,6 +484,9 @@
>  #define USB_VENDOR_ID_PANTHERLORD	0x0810
>  #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK	0x0001
>  
> +#define USB_VENDOR_ID_PENMOUNT		0x14e1
> +#define USB_DEVICE_ID_PENMOUNT_PCI	0x3500
> +
>  #define USB_VENDOR_ID_PETALYNX		0x18b1
>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
>  
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 6005e78..51b5d27 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -89,6 +89,7 @@ struct mt_class {
>  #define MT_CLS_EGALAX				5
>  #define MT_CLS_STANTUM				6
>  #define MT_CLS_3M				7
> +#define MT_CLS_CONFIDENCE			8
>  
>  #define MT_DEFAULT_MAXCONTACT	10
>  
> @@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
>  		.sn_move = 2048,
>  		.sn_width = 128,
>  		.sn_height = 128 },
> +	{ .name = MT_CLS_CONFIDENCE,
> +		.quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
>  
>  	{ }
>  };
> @@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
>  		HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>  			USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>  
> +	/* PenMount panels */
> +	{ .driver_data = MT_CLS_CONFIDENCE,
> +		HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
> +			USB_DEVICE_ID_PENMOUNT_PCI) },
> +
>  	/* PixCir-based panels */
>  	{ .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>  		HID_USB_DEVICE(USB_VENDOR_ID_HANVON,

I have modified the commit message slightly, to reflect that Benjamin has 
rebased John's original patch on top of last_index_field changes, and 
applied.

Thanks a lot everybody.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-22  9:57     ` Jiri Kosina
@ 2011-04-22 10:12       ` Benjamin Tissoires
  0 siblings, 0 replies; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-22 10:12 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Dmitry Torokhov, Henrik Rydberg, Stephane Chatty, John Sung,
	linux-input, linux-kernel

On Fri, Apr 22, 2011 at 11:57, Jiri Kosina <jkosina@suse.cz> wrote:
> On Thu, 21 Apr 2011, Benjamin Tissoires wrote:
>
>> From: John Sung <penmount.touch@gmail.com>
>>
>> This patch adds PenMount support to hid-multitouch.
>> A new class MT_CLS_CONFIDENCE is defined for PenMount,
>> since it uses HID_DG_CONFIDENCE as the valid flag.
>>
>> Signed-off-by: John Sung <penmount.touch@gmail.com>
>> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
>> Acked-by: Henrik Rydberg <rydberg@euromail.se>
>>
>> ---
>>
>> Hi Guys,
>>
>> this is the final version (I hope so).
>> I changed the from, restored back the Kconfig part and reintroduced the commit message.
>> John, I hope it's good for you.
>>
>> Cheers,
>> Benjamin
>>
>>  drivers/hid/Kconfig          |    1 +
>>  drivers/hid/hid-core.c       |    1 +
>>  drivers/hid/hid-ids.h        |    3 +++
>>  drivers/hid/hid-multitouch.c |    8 ++++++++
>>  4 files changed, 13 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
>> index 996ae3a..8058cf1 100644
>> --- a/drivers/hid/Kconfig
>> +++ b/drivers/hid/Kconfig
>> @@ -313,6 +313,7 @@ config HID_MULTITOUCH
>>         - Cypress TrueTouch panels
>>         - Hanvon dual touch panels
>>         - IrTouch Infrared USB panels
>> +       - PenMount dual touch panels
>>         - Pixcir dual touch panels
>>         - 'Sensing Win7-TwoFinger' panel by GeneralTouch
>>            - eGalax dual-touch panels, including the
>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>> index c3d6626..6e31b9f 100644
>> --- a/drivers/hid/hid-core.c
>> +++ b/drivers/hid/hid-core.c
>> @@ -1438,6 +1438,7 @@ 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_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_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
>>       { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
>> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
>> index d485894..252aeba 100644
>> --- a/drivers/hid/hid-ids.h
>> +++ b/drivers/hid/hid-ids.h
>> @@ -484,6 +484,9 @@
>>  #define USB_VENDOR_ID_PANTHERLORD    0x0810
>>  #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK  0x0001
>>
>> +#define USB_VENDOR_ID_PENMOUNT               0x14e1
>> +#define USB_DEVICE_ID_PENMOUNT_PCI   0x3500
>> +
>>  #define USB_VENDOR_ID_PETALYNX               0x18b1
>>  #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037
>>
>> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
>> index 6005e78..51b5d27 100644
>> --- a/drivers/hid/hid-multitouch.c
>> +++ b/drivers/hid/hid-multitouch.c
>> @@ -89,6 +89,7 @@ struct mt_class {
>>  #define MT_CLS_EGALAX                                5
>>  #define MT_CLS_STANTUM                               6
>>  #define MT_CLS_3M                            7
>> +#define MT_CLS_CONFIDENCE                    8
>>
>>  #define MT_DEFAULT_MAXCONTACT        10
>>
>> @@ -156,6 +157,8 @@ struct mt_class mt_classes[] = {
>>               .sn_move = 2048,
>>               .sn_width = 128,
>>               .sn_height = 128 },
>> +     { .name = MT_CLS_CONFIDENCE,
>> +             .quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
>>
>>       { }
>>  };
>> @@ -584,6 +587,11 @@ static const struct hid_device_id mt_devices[] = {
>>               HID_USB_DEVICE(USB_VENDOR_ID_IRTOUCHSYSTEMS,
>>                       USB_DEVICE_ID_IRTOUCH_INFRARED_USB) },
>>
>> +     /* PenMount panels */
>> +     { .driver_data = MT_CLS_CONFIDENCE,
>> +             HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT,
>> +                     USB_DEVICE_ID_PENMOUNT_PCI) },
>> +
>>       /* PixCir-based panels */
>>       { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID,
>>               HID_USB_DEVICE(USB_VENDOR_ID_HANVON,
>
> I have modified the commit message slightly, to reflect that Benjamin has
> rebased John's original patch on top of last_index_field changes, and
> applied.
>

That's good for me ;-)

Thanks a lot Jiri,
Benjamin

> Thanks a lot everybody.
>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-21 12:05             ` Benjamin Tissoires
@ 2011-04-28 14:16               ` Richard Nauber
  2011-04-28 14:58                 ` Benjamin Tissoires
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Nauber @ 2011-04-28 14:16 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Henrik Rydberg, Jiri Kosina, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, PenMount

Pardon my latency,
but I was busy during the holidays...

Benjamin, is my testing still required? I could give the patch a try
on this beauty:
Bus 002 Device 002: ID 0eef:480e D-WAV Scientific Co., Ltd
when it is needed. But I see that your new patches are already
accepted by Jiri and a breakage on my device is not very likely,
right?!

Greetings,
Richard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] HID: add support for PenMount dual-touch panel
  2011-04-28 14:16               ` Richard Nauber
@ 2011-04-28 14:58                 ` Benjamin Tissoires
  0 siblings, 0 replies; 23+ messages in thread
From: Benjamin Tissoires @ 2011-04-28 14:58 UTC (permalink / raw)
  To: Richard Nauber
  Cc: Henrik Rydberg, Jiri Kosina, PenMount, Dmitry Torokhov,
	Stephane Chatty, linux-input, PenMount

Hi Richard,

On Thu, Apr 28, 2011 at 16:16, Richard Nauber
<richard.nauber@googlemail.com> wrote:
> Pardon my latency,
> but I was busy during the holidays...
>
> Benjamin, is my testing still required? I could give the patch a try

Well, Henrik made the tests for us. But you can still give a try (I
don't remember which device Henrik had).

> on this beauty:
> Bus 002 Device 002: ID 0eef:480e D-WAV Scientific Co., Ltd
> when it is needed. But I see that your new patches are already
> accepted by Jiri and a breakage on my device is not very likely,
> right?!

Yep, the patch has already been accepted. But if it's not working, we
can still re-patch on top of it ;-)

Cheers,
Benjamin

>
> Greetings,
> Richard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-04-28 14:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 12:15 [PATCH 0/2] Support for PenMount devices Benjamin Tissoires
2011-04-21 12:15 ` [PATCH 1/2] HID: hid-multitouch: refactor last_field_index Benjamin Tissoires
2011-04-21 12:45   ` Henrik Rydberg
2011-04-22  9:55     ` Jiri Kosina
2011-04-21 12:16 ` [PATCH 2/2] HID: add support for PenMount dual-touch panel Benjamin Tissoires
     [not found] ` <1303388160-2814-3-git-send-email-benjamin.tissoires@enac.fr>
2011-04-21 12:18   ` Jiri Kosina
2011-04-21 12:19     ` Benjamin Tissoires
2011-04-21 12:45   ` Henrik Rydberg
2011-04-21 14:21   ` [PATCH] " Benjamin Tissoires
2011-04-22  9:57     ` Jiri Kosina
2011-04-22 10:12       ` Benjamin Tissoires
  -- strict thread matches above, loose matches on Subject: below --
2011-04-21  7:31 John Sung
2011-04-20  9:19 PenMount
2011-04-20  9:47 ` Henrik Rydberg
2011-04-20  9:54   ` Benjamin Tissoires
2011-04-20 10:07     ` Henrik Rydberg
2011-04-21  9:17       ` Jiri Kosina
2011-04-21 10:53         ` Benjamin Tissoires
2011-04-21 11:58           ` Henrik Rydberg
2011-04-21 12:05             ` Benjamin Tissoires
2011-04-28 14:16               ` Richard Nauber
2011-04-28 14:58                 ` Benjamin Tissoires
     [not found] ` <201104201054.36974.dmitry.torokhov@gmail.com>
     [not found]   ` <BANLkTikwjPc9w-HJLitBYG1tdix1U=4ckg@mail.gmail.com>
2011-04-21  6:58     ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).