linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HID: Dead ./debug/hid/xxx/events
@ 2011-11-16  9:50 Cedric Sodhi
  2011-11-16 10:17 ` Benjamin Tissoires
  0 siblings, 1 reply; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-16  9:50 UTC (permalink / raw)
  To: linux-input

Hello everyone,

the context for this problem is getting the eGalax USB Touchscreen, ID
056a:0090, to work as such, as it is discussed on the linuxwacom-devel
list (see [1]).

Quickly summarized:

Adding the device as USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5, in line with
the ..._MULTITOUCH[1-4], succeeds in thus far, as that it appears as a
HID Touchscreen. However, as of 3.1.x, clicking, id est touching "jams"
as in the click is never released.

Updating to 3.2.x-torvalds' kernel should have resolved that jamming,
but instead no clicks or releases are recognized at all.

The real problem with debugging that, though, is that

/sys/kernel/debug/hid/<eGalax>/events

remains dead, in any kernel, 3.1.x-gentoo, 3.1.x-vanilla and
3.2.x-torvalds alike.

I hope that you may have an idea as for any of the problems, especially
why there appears no output on the ./events node (the according node for
my keyboard reports events just fine).

Pasted is .config [2] for 3.2.x-torvalds and ./hid/<eGalax>/rdesc [3] on
3.2.x-torvalds.

[1]
http://sourceforge.net/mailarchive/forum.php?thread_name=CAGzDe_Y2cSMxVPm-rcNSrMsew2V5Y0vbVyhXJBFCKraq7EaZ8g@mail.gmail.com&forum_name=linuxwacom-devel
[2] http://paste.pocoo.org/show/508548/
[3] http://paste.pocoo.org/show/508550/

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16  9:50 HID: Dead ./debug/hid/xxx/events Cedric Sodhi
@ 2011-11-16 10:17 ` Benjamin Tissoires
  2011-11-16 10:25   ` Cedric Sodhi
  0 siblings, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2011-11-16 10:17 UTC (permalink / raw)
  To: Cedric Sodhi; +Cc: linux-input

Hi Cedric,

If I understand correctly, your device is an eGalax one with a Wacom
VendorID... ;-)

I assume that you're the first of a long list that will encounter this
kind of problem:

Now, hid (the generic hid input layer) can detect if your device is a
multitouch one (by relying on the ContactID field in the report
descriptor), and it will release it if it's detected.
The counter part of this autodetection (in hid-multitouch) has not
been judged as enough mature to be included in the kernel, and
hid-multitouch can't handle your device automatically.

That's why you don't see any event* unless you add the VID:PID in
hid-multitouch.

I'm currently working on a solution to allow end-user to test more
efficiently their device with hid-multitouch.
If you want to be my guinea pig, it would help me.

Cheers,
Benjamin

On Wed, Nov 16, 2011 at 10:50, Cedric Sodhi <manday@gmx.net> wrote:
> Hello everyone,
>
> the context for this problem is getting the eGalax USB Touchscreen, ID
> 056a:0090, to work as such, as it is discussed on the linuxwacom-devel
> list (see [1]).
>
> Quickly summarized:
>
> Adding the device as USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5, in line with
> the ..._MULTITOUCH[1-4], succeeds in thus far, as that it appears as a
> HID Touchscreen. However, as of 3.1.x, clicking, id est touching "jams"
> as in the click is never released.
>
> Updating to 3.2.x-torvalds' kernel should have resolved that jamming,
> but instead no clicks or releases are recognized at all.
>
> The real problem with debugging that, though, is that
>
> /sys/kernel/debug/hid/<eGalax>/events
>
> remains dead, in any kernel, 3.1.x-gentoo, 3.1.x-vanilla and
> 3.2.x-torvalds alike.
>
> I hope that you may have an idea as for any of the problems, especially
> why there appears no output on the ./events node (the according node for
> my keyboard reports events just fine).
>
> Pasted is .config [2] for 3.2.x-torvalds and ./hid/<eGalax>/rdesc [3] on
> 3.2.x-torvalds.
>
> [1]
> http://sourceforge.net/mailarchive/forum.php?thread_name=CAGzDe_Y2cSMxVPm-rcNSrMsew2V5Y0vbVyhXJBFCKraq7EaZ8g@mail.gmail.com&forum_name=linuxwacom-devel
> [2] http://paste.pocoo.org/show/508548/
> [3] http://paste.pocoo.org/show/508550/
> --
> 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] 13+ messages in thread

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 10:17 ` Benjamin Tissoires
@ 2011-11-16 10:25   ` Cedric Sodhi
  2011-11-16 13:41     ` Chris Bagwell
  0 siblings, 1 reply; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-16 10:25 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input

Dear Benjamin,

On Wed, Nov 16, 2011 at 11:17:57AM +0100, Benjamin Tissoires wrote:
> Hi Cedric,
> 
> If I understand correctly, your device is an eGalax one with a Wacom
> VendorID... ;-)

No. The VID is that of DWAV, as it should be. It might have been
misleading to mention Wacom here, which is - at least with regard to the
issue at hand - not related. I was just lucky the guys (esp. Chris) at
linuxwacom-devel would take a look at the issue, since obviously, they
are experts on touchscreens.
> 
> I assume that you're the first of a long list that will encounter this
> kind of problem:

You are right. I'm not the first, either, though. The eGalax is the
touchdevice of the ASUS EEE Slate, in conjunction with a Wacom for the
pen (yes, two devices: eGalax for finger and Wacom for pen).
> 
> Now, hid (the generic hid input layer) can detect if your device is a
> multitouch one (by relying on the ContactID field in the report
> descriptor), and it will release it if it's detected.
> The counter part of this autodetection (in hid-multitouch) has not
> been judged as enough mature to be included in the kernel, and
> hid-multitouch can't handle your device automatically.
> 
> That's why you don't see any event* unless you add the VID:PID in
> hid-multitouch.

That's what I already did, as I tried to describe by saying that I added
"MULTITOUCH5" in line with the other MULTITOUCH[1-4] of DWAV VID.

> 
> I'm currently working on a solution to allow end-user to test more
> efficiently their device with hid-multitouch.
> If you want to be my guinea pig, it would help me.

I'd happily be your guinea pig. I suggest you browse through the thread
which I referred to, where Chris helped me solve a bulk of the problems
already and also told me how to add the VID:PID to the whitelist of
hid-multitouch.

regards,
Cedric
> 
> Cheers,
> Benjamin
> 
> On Wed, Nov 16, 2011 at 10:50, Cedric Sodhi <manday@gmx.net> wrote:
> > Hello everyone,
> >
> > the context for this problem is getting the eGalax USB Touchscreen, ID
> > 056a:0090, to work as such, as it is discussed on the linuxwacom-devel
> > list (see [1]).
> >
> > Quickly summarized:
> >
> > Adding the device as USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5, in line with
> > the ..._MULTITOUCH[1-4], succeeds in thus far, as that it appears as a
> > HID Touchscreen. However, as of 3.1.x, clicking, id est touching "jams"
> > as in the click is never released.
> >
> > Updating to 3.2.x-torvalds' kernel should have resolved that jamming,
> > but instead no clicks or releases are recognized at all.
> >
> > The real problem with debugging that, though, is that
> >
> > /sys/kernel/debug/hid/<eGalax>/events
> >
> > remains dead, in any kernel, 3.1.x-gentoo, 3.1.x-vanilla and
> > 3.2.x-torvalds alike.
> >
> > I hope that you may have an idea as for any of the problems, especially
> > why there appears no output on the ./events node (the according node for
> > my keyboard reports events just fine).
> >
> > Pasted is .config [2] for 3.2.x-torvalds and ./hid/<eGalax>/rdesc [3] on
> > 3.2.x-torvalds.
> >
> > [1]
> > http://sourceforge.net/mailarchive/forum.php?thread_name=CAGzDe_Y2cSMxVPm-rcNSrMsew2V5Y0vbVyhXJBFCKraq7EaZ8g@mail.gmail.com&forum_name=linuxwacom-devel
> > [2] http://paste.pocoo.org/show/508548/
> > [3] http://paste.pocoo.org/show/508550/
> > --
> > 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] 13+ messages in thread

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 10:25   ` Cedric Sodhi
@ 2011-11-16 13:41     ` Chris Bagwell
  2011-11-16 14:55       ` Cedric Sodhi
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Bagwell @ 2011-11-16 13:41 UTC (permalink / raw)
  To: Cedric Sodhi; +Cc: Benjamin Tissoires, linux-input

On Wed, Nov 16, 2011 at 4:25 AM, Cedric Sodhi <manday@gmx.net> wrote:
> Dear Benjamin,
>
> On Wed, Nov 16, 2011 at 11:17:57AM +0100, Benjamin Tissoires wrote:
>> Hi Cedric,
>>
>> If I understand correctly, your device is an eGalax one with a Wacom
>> VendorID... ;-)
>
> No. The VID is that of DWAV, as it should be. It might have been
> misleading to mention Wacom here, which is - at least with regard to the
> issue at hand - not related. I was just lucky the guys (esp. Chris) at
> linuxwacom-devel would take a look at the issue, since obviously, they
> are experts on touchscreens.
>>
>> I assume that you're the first of a long list that will encounter this
>> kind of problem:
>
> You are right. I'm not the first, either, though. The eGalax is the
> touchdevice of the ASUS EEE Slate, in conjunction with a Wacom for the
> pen (yes, two devices: eGalax for finger and Wacom for pen).
>>
>> Now, hid (the generic hid input layer) can detect if your device is a
>> multitouch one (by relying on the ContactID field in the report
>> descriptor), and it will release it if it's detected.
>> The counter part of this autodetection (in hid-multitouch) has not
>> been judged as enough mature to be included in the kernel, and
>> hid-multitouch can't handle your device automatically.
>>
>> That's why you don't see any event* unless you add the VID:PID in
>> hid-multitouch.
>
> That's what I already did, as I tried to describe by saying that I added
> "MULTITOUCH5" in line with the other MULTITOUCH[1-4] of DWAV VID.
>
>>
>> I'm currently working on a solution to allow end-user to test more
>> efficiently their device with hid-multitouch.
>> If you want to be my guinea pig, it would help me.
>
> I'd happily be your guinea pig. I suggest you browse through the thread
> which I referred to, where Chris helped me solve a bulk of the problems
> already and also told me how to add the VID:PID to the whitelist of
> hid-multitouch.
>
> regards,
> Cedric
>>
>> Cheers,
>> Benjamin
>>
>> On Wed, Nov 16, 2011 at 10:50, Cedric Sodhi <manday@gmx.net> wrote:
>> > Hello everyone,
>> >
>> > the context for this problem is getting the eGalax USB Touchscreen, ID
>> > 056a:0090, to work as such, as it is discussed on the linuxwacom-devel
>> > list (see [1]).
>> >
>> > Quickly summarized:
>> >
>> > Adding the device as USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5, in line with
>> > the ..._MULTITOUCH[1-4], succeeds in thus far, as that it appears as a
>> > HID Touchscreen. However, as of 3.1.x, clicking, id est touching "jams"
>> > as in the click is never released.
>> >
>> > Updating to 3.2.x-torvalds' kernel should have resolved that jamming,
>> > but instead no clicks or releases are recognized at all.
>> >
>> > The real problem with debugging that, though, is that
>> >
>> > /sys/kernel/debug/hid/<eGalax>/events
>> >
>> > remains dead, in any kernel, 3.1.x-gentoo, 3.1.x-vanilla and
>> > 3.2.x-torvalds alike.
>> >
>> > I hope that you may have an idea as for any of the problems, especially
>> > why there appears no output on the ./events node (the according node for
>> > my keyboard reports events just fine).
>> >
>> > Pasted is .config [2] for 3.2.x-torvalds and ./hid/<eGalax>/rdesc [3] on
>> > 3.2.x-torvalds.
>> >
>> > [1]
>> > http://sourceforge.net/mailarchive/forum.php?thread_name=CAGzDe_Y2cSMxVPm-rcNSrMsew2V5Y0vbVyhXJBFCKraq7EaZ8g@mail.gmail.com&forum_name=linuxwacom-devel
>> > [2] http://paste.pocoo.org/show/508548/
>> > [3] http://paste.pocoo.org/show/508550/
>> > --

And a little extra info.  Cedric tested the patch that is now in
Jiri's upstream-fixes branch for this new 0xa0001 and got success so I
sent in patch.  After several days, he tested closer and realized it
was getting X/Y movement and what I'll call unpredictable Touch
behaviour.  It would either act like a stylus hovering but never
touching or it would always act like touching and never release.

Events are working and you can test with evtest.  I've verified at
least one test stream he emailed that it is not correctly sending
BTN_TOUCH but it is sending good X/Y using MT and pointer emulation
events.

It would probably be easy to see the issue if debug/hid/*/events were
being displayed but for some reason "cat rdesc" outputs stuff but "cat
events" does not.  I couldn't come up with more ideas remotely.

The redesc shows it reports ContactID's range of 0-16 and features
says only 10 touches max (seen in above paste link).  So my last guess
is that we may be using the wrong quirk for this one since it sounds
like ContactID is not 1-to-1 with touches.  Hard to tell without
sample events though.

Chris

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 13:41     ` Chris Bagwell
@ 2011-11-16 14:55       ` Cedric Sodhi
  2011-11-16 15:40         ` Cedric Sodhi
  0 siblings, 1 reply; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-16 14:55 UTC (permalink / raw)
  To: Chris Bagwell; +Cc: Benjamin Tissoires, linux-input

On Wed, Nov 16, 2011 at 07:41:04AM -0600, Chris Bagwell wrote:
> And a little extra info.  Cedric tested the patch that is now in
> Jiri's upstream-fixes branch for this new 0xa0001 and got success so I
> sent in patch.  After several days, he tested closer and realized it
> was getting X/Y movement and what I'll call unpredictable Touch
> behaviour.  It would either act like a stylus hovering but never
> touching or it would always act like touching and never release.
> 
> Events are working and you can test with evtest.  I've verified at
> least one test stream he emailed that it is not correctly sending
> BTN_TOUCH but it is sending good X/Y using MT and pointer emulation
> events.
> 
> It would probably be easy to see the issue if debug/hid/*/events were
> being displayed but for some reason "cat rdesc" outputs stuff but "cat
> events" does not.  I couldn't come up with more ideas remotely.
> 
> The redesc shows it reports ContactID's range of 0-16 and features
> says only 10 touches max (seen in above paste link).  So my last guess
> is that we may be using the wrong quirk for this one since it sounds
> like ContactID is not 1-to-1 with touches.  Hard to tell without
> sample events though.
> 
> Chris

Chris, it might interest you that the event node now fires and outputs
events, when letting hid-multitouch handle the device through Benjamin's
patch (Writing "3 0eef a001 1" to new_id).

I think when adding the MULTITOUCH5 in the source in the exact same
manner MULTITOUCH[1-4] are added I must have copied some quirks which
interfere with the event node. Now, adding the device by Benjamin's way
does not load any quirks by default, so the event node works.

Either Benjamin or I will tell you more once we discovered something
definite.

regards,
Cedric

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 14:55       ` Cedric Sodhi
@ 2011-11-16 15:40         ` Cedric Sodhi
  2011-11-16 16:15           ` Chris Bagwell
  0 siblings, 1 reply; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-16 15:40 UTC (permalink / raw)
  To: Chris Bagwell; +Cc: Benjamin Tissoires, linux-input

Thanks to Benjamin's help and his neat patch which allows tempering with
quirks through sysfs, I got the device

eGalax 0eef:a001

to work. It works with the quirks

MT_QUIRK_SLOT_IS_CONTACTID | MT_QUIRK_ALWAYS_VALID ( = 18 )

so, using Benjamin's interface:

(1) Adding the device with
$ cd '/sys/modules/hid_multitouch/driver/hid:hid-multitouch'
$ echo "3 0eef a001 1" > new_id

(2) Setting the quirks with
$ echo 18 > '0003:0EEF:A001.0001/quirks'

That's it. The device works!

regards,
Cedric

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 15:40         ` Cedric Sodhi
@ 2011-11-16 16:15           ` Chris Bagwell
  2011-11-16 17:01             ` Benjamin Tissoires
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Bagwell @ 2011-11-16 16:15 UTC (permalink / raw)
  To: Cedric Sodhi; +Cc: Benjamin Tissoires, linux-input

On Wed, Nov 16, 2011 at 9:40 AM, Cedric Sodhi <manday@gmx.net> wrote:
> Thanks to Benjamin's help and his neat patch which allows tempering with
> quirks through sysfs, I got the device
>
> eGalax 0eef:a001
>
> to work. It works with the quirks
>
> MT_QUIRK_SLOT_IS_CONTACTID | MT_QUIRK_ALWAYS_VALID ( = 18 )
>
> so, using Benjamin's interface:
>
> (1) Adding the device with
> $ cd '/sys/modules/hid_multitouch/driver/hid:hid-multitouch'
> $ echo "3 0eef a001 1" > new_id
>
> (2) Setting the quirks with
> $ echo 18 > '0003:0EEF:A001.0001/quirks'
>
> That's it. The device works!

Benjamin, do you have a take away from this?  We are setting quirks to
0x62 which should same as 0x12 for most purposes.  Combine this with
the Acer eGalax patch and my guess is its .maxcontacts = 2 thats
hurting things?

If so, do you have enough report descriptors to know if we can remove
it for all or if we need to create an MT_CLS_EGALAX_HAS_MAXCONTACTS?
My guess is for the ones that have correct MAXCONTACTS, they also have
valid logical X/Y sizes and so we can remote that quirk as well.  At
least this one does.

Chris

>
> regards,
> Cedric
>

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 16:15           ` Chris Bagwell
@ 2011-11-16 17:01             ` Benjamin Tissoires
  2011-11-16 20:48               ` Cedric Sodhi
  0 siblings, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2011-11-16 17:01 UTC (permalink / raw)
  To: Chris Bagwell; +Cc: Cedric Sodhi, linux-input

On 11/16/2011 05:15 PM, Chris Bagwell wrote:

> On Wed, Nov 16, 2011 at 9:40 AM, Cedric Sodhi <manday@gmx.net> wrote:
>> Thanks to Benjamin's help and his neat patch which allows tempering with
>> quirks through sysfs, I got the device
>>
>> eGalax 0eef:a001
>>
>> to work. It works with the quirks
>>
>> MT_QUIRK_SLOT_IS_CONTACTID | MT_QUIRK_ALWAYS_VALID ( = 18 )
>>
>> so, using Benjamin's interface:
>>
>> (1) Adding the device with
>> $ cd '/sys/modules/hid_multitouch/driver/hid:hid-multitouch'
>> $ echo "3 0eef a001 1" > new_id
>>
>> (2) Setting the quirks with
>> $ echo 18 > '0003:0EEF:A001.0001/quirks'
>>
>> That's it. The device works!
> 
> Benjamin, do you have a take away from this?  We are setting quirks to
> 0x62 which should same as 0x12 for most purposes.  Combine this with
> the Acer eGalax patch and my guess is its .maxcontacts = 2 thats
> hurting things?


Well, Cedric as troubles again. I don't think the hiddev interface problem is related to hid-multitouch.
The point is that his device "works", i.e. it emits events in /dev/input/eventX, but the hiddev event doesn't.

BTW, my patch is nearly ready. I mainly missed the Documentation ABI:

>From a1890f599e9a2e3af3b1161a0224e470915065b0 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Date: Wed, 16 Nov 2011 17:48:34 +0100
Subject: [PATCH 2/2] hid-multitouch: WIP: create sysfs attribute to control
 quirks from user-space

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
---
 drivers/hid/hid-multitouch.c |  120 +++++++++++++++++++++++++++++++++++------
 1 files changed, 102 insertions(+), 18 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 77dea57..3094d37 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -60,9 +60,19 @@ struct mt_slot {
 	bool seen_in_this_frame;/* has this slot been updated */
 };
 
+struct mt_class {
+	__s32 name;	/* MT_CLS */
+	__s32 quirks;
+	__s32 sn_move;	/* Signal/noise ratio for move events */
+	__s32 sn_width;	/* Signal/noise ratio for width events */
+	__s32 sn_height;	/* Signal/noise ratio for height events */
+	__s32 sn_pressure;	/* Signal/noise ratio for pressure events */
+	__u8 maxcontacts;
+};
+
 struct mt_device {
 	struct mt_slot curdata;	/* placeholder of incoming data */
-	struct mt_class *mtclass;	/* our mt device class */
+	struct mt_class mtclass;	/* our mt device class */
 	unsigned last_field_index;	/* last field index of the report */
 	unsigned last_slot_field;	/* the last field of a slot */
 	int last_mt_collection;	/* last known mt-related collection */
@@ -74,16 +84,6 @@ struct mt_device {
 	struct mt_slot *slots;
 };
 
-struct mt_class {
-	__s32 name;	/* MT_CLS */
-	__s32 quirks;
-	__s32 sn_move;	/* Signal/noise ratio for move events */
-	__s32 sn_width;	/* Signal/noise ratio for width events */
-	__s32 sn_height;	/* Signal/noise ratio for height events */
-	__s32 sn_pressure;	/* Signal/noise ratio for pressure events */
-	__u8 maxcontacts;
-};
-
 /* classes of device behavior */
 #define MT_CLS_DEFAULT				0x0001
 
@@ -188,6 +188,87 @@ struct mt_class mt_classes[] = {
 	{ }
 };
 
+static ssize_t mt_show_quirks(struct device *dev,
+			   struct device_attribute *attr,
+			   char *buf)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	return sprintf(buf, "%u\n", td->mtclass.quirks);
+}
+
+static ssize_t mt_set_quirks(struct device *dev,
+			  struct device_attribute *attr,
+			  const char *buf, size_t count)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	unsigned long val;
+
+	if (strict_strtoul(buf, 0, &val))
+		return -EINVAL;
+
+	td->mtclass.quirks = val;
+
+	return count;
+}
+
+static DEVICE_ATTR(quirks, S_IWUSR | S_IRUGO, mt_show_quirks, mt_set_quirks);
+
+static ssize_t mt_show_class(struct device *dev,
+			   struct device_attribute *attr,
+			   char *buf)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	return sprintf(buf, "0x%x\n", td->mtclass.name);
+}
+
+static ssize_t mt_set_class(struct device *dev,
+			  struct device_attribute *attr,
+			  const char *buf, size_t count)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+	struct mt_class *mtclass = NULL; /* MT_CLS_DEFAULT */
+	int i;
+
+	unsigned long val;
+
+	if (strict_strtoul(buf, 0, &val))
+		return -EINVAL;
+
+
+	for (i = 0; mt_classes[i].name ; i++) {
+		if (val == mt_classes[i].name) {
+			mtclass = &(mt_classes[i]);
+			break;
+		}
+	}
+
+	if (!mtclass)
+		return -EINVAL;
+
+	td->mtclass = *mtclass;
+
+	return count;
+}
+
+static DEVICE_ATTR(class, S_IWUSR | S_IRUGO, mt_show_class, mt_set_class);
+
+static struct attribute *sysfs_attrs[] = {
+	&dev_attr_quirks.attr,
+	&dev_attr_class.attr,
+	NULL
+};
+
+static struct attribute_group mt_attribute_group = {
+	.attrs = sysfs_attrs
+};
+
 static void mt_feature_mapping(struct hid_device *hdev,
 		struct hid_field *field, struct hid_usage *usage)
 {
@@ -199,9 +280,9 @@ static void mt_feature_mapping(struct hid_device *hdev,
 		break;
 	case HID_DG_CONTACTMAX:
 		td->maxcontacts = field->value[0];
-		if (td->mtclass->maxcontacts)
+		if (td->mtclass.maxcontacts)
 			/* check if the maxcontacts is given by the class */
-			td->maxcontacts = td->mtclass->maxcontacts;
+			td->maxcontacts = td->mtclass.maxcontacts;
 
 		break;
 	}
@@ -221,7 +302,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		unsigned long **bit, int *max)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
-	struct mt_class *cls = td->mtclass;
+	struct mt_class *cls = &td->mtclass;
 	__s32 quirks = cls->quirks;
 
 	/* Only map fields from TouchScreen or TouchPad collections.
@@ -370,7 +451,7 @@ static int mt_input_mapped(struct hid_device *hdev, struct hid_input *hi,
 
 static int mt_compute_slot(struct mt_device *td)
 {
-	__s32 quirks = td->mtclass->quirks;
+	__s32 quirks = td->mtclass.quirks;
 
 	if (quirks & MT_QUIRK_SLOT_IS_CONTACTID)
 		return td->curdata.contactid;
@@ -414,7 +495,7 @@ static void mt_emit_event(struct mt_device *td, struct input_dev *input)
 
 	for (i = 0; i < td->maxcontacts; ++i) {
 		struct mt_slot *s = &(td->slots[i]);
-		if ((td->mtclass->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) &&
+		if ((td->mtclass.quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) &&
 			!s->seen_in_this_frame) {
 			s->touch_state = false;
 		}
@@ -451,7 +532,7 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
 				struct hid_usage *usage, __s32 value)
 {
 	struct mt_device *td = hid_get_drvdata(hid);
-	__s32 quirks = td->mtclass->quirks;
+	__s32 quirks = td->mtclass.quirks;
 
 	if (hid->claimed & HID_CLAIMED_INPUT && td->slots) {
 		switch (usage->hid) {
@@ -559,7 +640,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
 		dev_err(&hdev->dev, "cannot allocate multitouch data\n");
 		return -ENOMEM;
 	}
-	td->mtclass = mtclass;
+	td->mtclass = *mtclass;
 	td->inputmode = -1;
 	td->last_mt_collection = -1;
 	hid_set_drvdata(hdev, td);
@@ -581,6 +662,8 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
 		goto fail;
 	}
 
+	ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
+
 	mt_set_input_mode(hdev);
 
 	return 0;
@@ -601,6 +684,7 @@ static int mt_reset_resume(struct hid_device *hdev)
 static void mt_remove(struct hid_device *hdev)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
+	sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group);
 	hid_hw_stop(hdev);
 	kfree(td->slots);
 	kfree(td);
-- 
1.7.4.4




> 
> If so, do you have enough report descriptors to know if we can remove
> it for all or if we need to create an MT_CLS_EGALAX_HAS_MAXCONTACTS?
> My guess is for the ones that have correct MAXCONTACTS, they also have
> valid logical X/Y sizes and so we can remote that quirk as well.  At
> least this one does.


I'll have to digg it through them....

Cheers,
Benjamin

> 
> Chris
> 
>>
>> regards,
>> Cedric
>>


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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 17:01             ` Benjamin Tissoires
@ 2011-11-16 20:48               ` Cedric Sodhi
  2011-11-16 21:22                 ` Benjamin Tissoires
  2011-11-16 21:23                 ` Chris Bagwell
  0 siblings, 2 replies; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-16 20:48 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Chris Bagwell, linux-input, linuxwacom-devel

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

Dear Benjamin,

I applied your patch tp 3.2-jikos (uname shows 3.1, though). The
diff to jikos' original is now [attached].

Chris says the output of evtest still signifies problems with
multitouch:

> > http://ompldr.org/iYmIzYw
>
> Cedric, can you send these logs to Benjamin for ideas?  The HID events
> look good but the evtest log for 2 fingers is not.  The two touches
> are fighting each other.  That "-1" value is interrupted as each
> finger is being lifted in between each new X/Y report.
> 
> Also, can you send me and Benjamin the source code diff of what your
> testing against kernel tree?
> 
> The behavior in your evtest log looks like what would happen if your
> setting the MT_QUIRK_NOT_SEEN_MEANS_UP.  Since your HW only sends 1
> fingers worth of data per packet, you do not want that quirk.
> 
> I'll still hold off on xf86-input-wacom issues until the events coming
> are sane.  Your current events will cause xf86-input-wacom to do all
> kinds of weird stuff thats not worth effort to weed threw.
> 
> Chris

These logs in that tarfile were created while still manually adding the
ID via your sysfs interface. You find yet another evtest log for
two-finger touch attached.

Cedric

[-- Attachment #2: evtest_twofinger.log --]
[-- Type: text/plain, Size: 20480 bytes --]

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xeef product 0xa001 version 0x210
Input device name: "eGalax_eMPIA Technology Inc. PCAP MultiTouch Controller"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value  23408
      Min        0
      Max    32767
      Fuzz       7
    Event code 1 (Y)
      Value  19664
      Min        0
      Max    32767
      Fuzz       7
    Event code 47 (Slot)
      Value      0
      Min        0
      Max        9
    Event code 53 (Position X)
      Value      0
      Min        0
      Max    32767
      Fuzz       7
    Event code 54 (Position Y)
      Value      0
      Min        0
      Max    32767
      Fuzz       7
    Event code 57 (Tracking ID)
      Value      0
      Min        0
      Max    65535
Testing ... (interrupt to exit)
Event: time 1321475730.593802, type 3 (Absolute), code 57 (Tracking ID), value 7
Event: time 1321475730.593804, type 3 (Absolute), code 53 (Position X), value 19920
Event: time 1321475730.593804, type 3 (Absolute), code 54 (Position Y), value 18048
Event: time 1321475730.593815, type 1 (Key), code 330 (Touch), value 1
Event: time 1321475730.593817, type 3 (Absolute), code 0 (X), value 19920
Event: time 1321475730.593818, type 3 (Absolute), code 1 (Y), value 18048
Event: time 1321475730.593818, -------------- Report Sync ------------
Event: time 1321475730.641804, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475730.641805, type 3 (Absolute), code 57 (Tracking ID), value 8
Event: time 1321475730.641806, type 3 (Absolute), code 53 (Position X), value 20544
Event: time 1321475730.641807, type 3 (Absolute), code 54 (Position Y), value 9504
Event: time 1321475730.641819, -------------- Report Sync ------------
Event: time 1321475730.816799, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475730.816799, type 3 (Absolute), code 53 (Position X), value 19888
Event: time 1321475730.816800, type 3 (Absolute), code 54 (Position Y), value 18032
Event: time 1321475730.816815, type 3 (Absolute), code 0 (X), value 19888
Event: time 1321475730.816815, type 3 (Absolute), code 1 (Y), value 18032
Event: time 1321475730.816816, -------------- Report Sync ------------
Event: time 1321475730.823797, type 3 (Absolute), code 53 (Position X), value 19872
Event: time 1321475730.823798, type 3 (Absolute), code 54 (Position Y), value 18016
Event: time 1321475730.823813, type 3 (Absolute), code 0 (X), value 19872
Event: time 1321475730.823813, type 3 (Absolute), code 1 (Y), value 18016
Event: time 1321475730.823814, -------------- Report Sync ------------
Event: time 1321475730.830799, type 3 (Absolute), code 53 (Position X), value 19856
Event: time 1321475730.830815, type 3 (Absolute), code 0 (X), value 19856
Event: time 1321475730.830816, -------------- Report Sync ------------
Event: time 1321475730.837798, type 3 (Absolute), code 53 (Position X), value 19840
Event: time 1321475730.837814, type 3 (Absolute), code 0 (X), value 19840
Event: time 1321475730.837815, -------------- Report Sync ------------
Event: time 1321475730.851796, type 3 (Absolute), code 53 (Position X), value 19808
Event: time 1321475730.851797, type 3 (Absolute), code 54 (Position Y), value 18000
Event: time 1321475730.851812, type 3 (Absolute), code 0 (X), value 19808
Event: time 1321475730.851812, type 3 (Absolute), code 1 (Y), value 18000
Event: time 1321475730.851813, -------------- Report Sync ------------
Event: time 1321475730.858792, type 3 (Absolute), code 53 (Position X), value 19792
Event: time 1321475730.858792, type 3 (Absolute), code 54 (Position Y), value 17984
Event: time 1321475730.858807, type 3 (Absolute), code 0 (X), value 19792
Event: time 1321475730.858808, type 3 (Absolute), code 1 (Y), value 17984
Event: time 1321475730.858809, -------------- Report Sync ------------
Event: time 1321475730.866782, type 3 (Absolute), code 53 (Position X), value 19776
Event: time 1321475730.866798, type 3 (Absolute), code 0 (X), value 19776
Event: time 1321475730.866799, -------------- Report Sync ------------
Event: time 1321475730.873779, type 3 (Absolute), code 53 (Position X), value 19760
Event: time 1321475730.873795, type 3 (Absolute), code 0 (X), value 19760
Event: time 1321475730.873796, -------------- Report Sync ------------
Event: time 1321475730.908793, type 3 (Absolute), code 53 (Position X), value 19744
Event: time 1321475730.908794, type 3 (Absolute), code 54 (Position Y), value 17968
Event: time 1321475730.908809, type 3 (Absolute), code 0 (X), value 19744
Event: time 1321475730.908810, type 3 (Absolute), code 1 (Y), value 17968
Event: time 1321475730.908811, -------------- Report Sync ------------
Event: time 1321475730.915792, type 3 (Absolute), code 53 (Position X), value 19728
Event: time 1321475730.915793, type 3 (Absolute), code 54 (Position Y), value 17952
Event: time 1321475730.915808, type 3 (Absolute), code 0 (X), value 19728
Event: time 1321475730.915808, type 3 (Absolute), code 1 (Y), value 17952
Event: time 1321475730.915809, -------------- Report Sync ------------
Event: time 1321475730.922798, type 3 (Absolute), code 53 (Position X), value 19712
Event: time 1321475730.922799, type 3 (Absolute), code 54 (Position Y), value 17936
Event: time 1321475730.922814, type 3 (Absolute), code 0 (X), value 19712
Event: time 1321475730.922814, type 3 (Absolute), code 1 (Y), value 17936
Event: time 1321475730.922815, -------------- Report Sync ------------
Event: time 1321475730.929798, type 3 (Absolute), code 53 (Position X), value 19696
Event: time 1321475730.929814, type 3 (Absolute), code 0 (X), value 19696
Event: time 1321475730.929815, -------------- Report Sync ------------
Event: time 1321475730.951802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475730.951802, type 3 (Absolute), code 53 (Position X), value 20528
Event: time 1321475730.951803, type 3 (Absolute), code 54 (Position Y), value 9472
Event: time 1321475730.951815, -------------- Report Sync ------------
Event: time 1321475730.958847, type 3 (Absolute), code 54 (Position Y), value 9456
Event: time 1321475730.958873, -------------- Report Sync ------------
Event: time 1321475730.965844, type 3 (Absolute), code 54 (Position Y), value 9440
Event: time 1321475730.965869, -------------- Report Sync ------------
Event: time 1321475730.972801, type 3 (Absolute), code 54 (Position Y), value 9424
Event: time 1321475730.972814, -------------- Report Sync ------------
Event: time 1321475731.565796, type 3 (Absolute), code 53 (Position X), value 20512
Event: time 1321475731.565797, type 3 (Absolute), code 54 (Position Y), value 9408
Event: time 1321475731.565810, -------------- Report Sync ------------
Event: time 1321475731.572802, type 3 (Absolute), code 54 (Position Y), value 9392
Event: time 1321475731.572815, -------------- Report Sync ------------
Event: time 1321475731.579802, type 3 (Absolute), code 54 (Position Y), value 9360
Event: time 1321475731.579815, -------------- Report Sync ------------
Event: time 1321475731.586810, type 3 (Absolute), code 54 (Position Y), value 9344
Event: time 1321475731.586823, -------------- Report Sync ------------
Event: time 1321475732.141800, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.141800, type 3 (Absolute), code 54 (Position Y), value 17904
Event: time 1321475732.141816, type 3 (Absolute), code 1 (Y), value 17904
Event: time 1321475732.141816, -------------- Report Sync ------------
Event: time 1321475732.156793, type 3 (Absolute), code 53 (Position X), value 19728
Event: time 1321475732.156809, type 3 (Absolute), code 0 (X), value 19728
Event: time 1321475732.156810, -------------- Report Sync ------------
Event: time 1321475732.163798, type 3 (Absolute), code 53 (Position X), value 19744
Event: time 1321475732.163814, type 3 (Absolute), code 0 (X), value 19744
Event: time 1321475732.163815, -------------- Report Sync ------------
Event: time 1321475732.164802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.164803, type 3 (Absolute), code 53 (Position X), value 20528
Event: time 1321475732.164816, -------------- Report Sync ------------
Event: time 1321475732.170779, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.170779, type 3 (Absolute), code 53 (Position X), value 19776
Event: time 1321475732.170794, type 3 (Absolute), code 0 (X), value 19776
Event: time 1321475732.170796, -------------- Report Sync ------------
Event: time 1321475732.171795, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.171796, type 3 (Absolute), code 53 (Position X), value 20560
Event: time 1321475732.171809, -------------- Report Sync ------------
Event: time 1321475732.177799, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.177799, type 3 (Absolute), code 53 (Position X), value 19808
Event: time 1321475732.177815, type 3 (Absolute), code 0 (X), value 19808
Event: time 1321475732.177816, -------------- Report Sync ------------
Event: time 1321475732.178802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.178802, type 3 (Absolute), code 53 (Position X), value 20592
Event: time 1321475732.178815, -------------- Report Sync ------------
Event: time 1321475732.184800, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.184801, type 3 (Absolute), code 53 (Position X), value 19840
Event: time 1321475732.184816, type 3 (Absolute), code 0 (X), value 19840
Event: time 1321475732.184817, -------------- Report Sync ------------
Event: time 1321475732.185830, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.185831, type 3 (Absolute), code 53 (Position X), value 20608
Event: time 1321475732.185857, -------------- Report Sync ------------
Event: time 1321475732.191847, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.191848, type 3 (Absolute), code 53 (Position X), value 19856
Event: time 1321475732.191879, type 3 (Absolute), code 0 (X), value 19856
Event: time 1321475732.191882, -------------- Report Sync ------------
Event: time 1321475732.192801, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.192802, type 3 (Absolute), code 53 (Position X), value 20640
Event: time 1321475732.192828, -------------- Report Sync ------------
Event: time 1321475732.198813, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.198813, type 3 (Absolute), code 53 (Position X), value 19888
Event: time 1321475732.198828, type 3 (Absolute), code 0 (X), value 19888
Event: time 1321475732.198830, -------------- Report Sync ------------
Event: time 1321475732.199795, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.199796, type 3 (Absolute), code 53 (Position X), value 20656
Event: time 1321475732.199809, -------------- Report Sync ------------
Event: time 1321475732.205853, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.205854, type 3 (Absolute), code 53 (Position X), value 19904
Event: time 1321475732.205885, type 3 (Absolute), code 0 (X), value 19904
Event: time 1321475732.205888, -------------- Report Sync ------------
Event: time 1321475732.206837, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.206838, type 3 (Absolute), code 53 (Position X), value 20672
Event: time 1321475732.206864, -------------- Report Sync ------------
Event: time 1321475732.212781, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.212782, type 3 (Absolute), code 53 (Position X), value 19920
Event: time 1321475732.212797, type 3 (Absolute), code 0 (X), value 19920
Event: time 1321475732.212798, -------------- Report Sync ------------
Event: time 1321475732.213782, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.213782, type 3 (Absolute), code 53 (Position X), value 20688
Event: time 1321475732.213796, -------------- Report Sync ------------
Event: time 1321475732.219799, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.219799, type 3 (Absolute), code 53 (Position X), value 19936
Event: time 1321475732.219815, type 3 (Absolute), code 0 (X), value 19936
Event: time 1321475732.219816, -------------- Report Sync ------------
Event: time 1321475732.220838, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.220839, type 3 (Absolute), code 53 (Position X), value 20704
Event: time 1321475732.220865, -------------- Report Sync ------------
Event: time 1321475732.233800, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.233800, type 3 (Absolute), code 53 (Position X), value 19984
Event: time 1321475732.233801, type 3 (Absolute), code 54 (Position Y), value 17936
Event: time 1321475732.233816, type 3 (Absolute), code 0 (X), value 19984
Event: time 1321475732.233816, type 3 (Absolute), code 1 (Y), value 17936
Event: time 1321475732.233817, -------------- Report Sync ------------
Event: time 1321475732.240799, type 3 (Absolute), code 53 (Position X), value 20016
Event: time 1321475732.240800, type 3 (Absolute), code 54 (Position Y), value 17952
Event: time 1321475732.240815, type 3 (Absolute), code 0 (X), value 20016
Event: time 1321475732.240816, type 3 (Absolute), code 1 (Y), value 17952
Event: time 1321475732.240817, -------------- Report Sync ------------
Event: time 1321475732.247793, type 3 (Absolute), code 53 (Position X), value 20032
Event: time 1321475732.247809, type 3 (Absolute), code 0 (X), value 20032
Event: time 1321475732.247810, -------------- Report Sync ------------
Event: time 1321475732.254799, type 3 (Absolute), code 53 (Position X), value 20048
Event: time 1321475732.254814, type 3 (Absolute), code 0 (X), value 20048
Event: time 1321475732.254815, -------------- Report Sync ------------
Event: time 1321475732.255797, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.255797, type 3 (Absolute), code 53 (Position X), value 20720
Event: time 1321475732.255798, type 3 (Absolute), code 54 (Position Y), value 9360
Event: time 1321475732.255811, -------------- Report Sync ------------
Event: time 1321475732.261798, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.261798, type 3 (Absolute), code 53 (Position X), value 20064
Event: time 1321475732.261814, type 3 (Absolute), code 0 (X), value 20064
Event: time 1321475732.261815, -------------- Report Sync ------------
Event: time 1321475732.262802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.262802, type 3 (Absolute), code 53 (Position X), value 20784
Event: time 1321475732.262803, type 3 (Absolute), code 54 (Position Y), value 9424
Event: time 1321475732.262815, -------------- Report Sync ------------
Event: time 1321475732.269801, type 3 (Absolute), code 53 (Position X), value 20816
Event: time 1321475732.269802, type 3 (Absolute), code 54 (Position Y), value 9440
Event: time 1321475732.269815, -------------- Report Sync ------------
Event: time 1321475732.277783, type 3 (Absolute), code 53 (Position X), value 20832
Event: time 1321475732.277784, type 3 (Absolute), code 54 (Position Y), value 9456
Event: time 1321475732.277797, -------------- Report Sync ------------
Event: time 1321475732.285839, type 3 (Absolute), code 53 (Position X), value 20864
Event: time 1321475732.285840, type 3 (Absolute), code 54 (Position Y), value 9472
Event: time 1321475732.285852, -------------- Report Sync ------------
Event: time 1321475732.290780, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.290780, type 3 (Absolute), code 53 (Position X), value 20128
Event: time 1321475732.290781, type 3 (Absolute), code 54 (Position Y), value 17968
Event: time 1321475732.290796, type 3 (Absolute), code 0 (X), value 20128
Event: time 1321475732.290796, type 3 (Absolute), code 1 (Y), value 17968
Event: time 1321475732.290797, -------------- Report Sync ------------
Event: time 1321475732.297799, type 3 (Absolute), code 53 (Position X), value 20160
Event: time 1321475732.297814, type 3 (Absolute), code 0 (X), value 20160
Event: time 1321475732.297815, -------------- Report Sync ------------
Event: time 1321475732.298802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.298803, type 3 (Absolute), code 53 (Position X), value 20944
Event: time 1321475732.298803, type 3 (Absolute), code 54 (Position Y), value 9536
Event: time 1321475732.298816, -------------- Report Sync ------------
Event: time 1321475732.304804, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.304804, type 3 (Absolute), code 53 (Position X), value 20192
Event: time 1321475732.304805, type 3 (Absolute), code 54 (Position Y), value 17984
Event: time 1321475732.304820, type 3 (Absolute), code 0 (X), value 20192
Event: time 1321475732.304820, type 3 (Absolute), code 1 (Y), value 17984
Event: time 1321475732.304821, -------------- Report Sync ------------
Event: time 1321475732.305802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.305802, type 3 (Absolute), code 53 (Position X), value 20960
Event: time 1321475732.305803, type 3 (Absolute), code 54 (Position Y), value 9552
Event: time 1321475732.305815, -------------- Report Sync ------------
Event: time 1321475732.311799, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.311799, type 3 (Absolute), code 53 (Position X), value 20208
Event: time 1321475732.311814, type 3 (Absolute), code 0 (X), value 20208
Event: time 1321475732.311816, -------------- Report Sync ------------
Event: time 1321475732.312853, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.312854, type 3 (Absolute), code 53 (Position X), value 20976
Event: time 1321475732.312856, type 3 (Absolute), code 54 (Position Y), value 9568
Event: time 1321475732.312881, -------------- Report Sync ------------
Event: time 1321475732.318818, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.318818, type 3 (Absolute), code 53 (Position X), value 20224
Event: time 1321475732.318834, type 3 (Absolute), code 0 (X), value 20224
Event: time 1321475732.318835, -------------- Report Sync ------------
Event: time 1321475732.319802, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.319802, type 3 (Absolute), code 53 (Position X), value 20992
Event: time 1321475732.319816, -------------- Report Sync ------------
Event: time 1321475732.423792, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.423793, type 3 (Absolute), code 53 (Position X), value 20256
Event: time 1321475732.423808, type 3 (Absolute), code 0 (X), value 20256
Event: time 1321475732.423810, -------------- Report Sync ------------
Event: time 1321475732.424853, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.424854, type 3 (Absolute), code 53 (Position X), value 21024
Event: time 1321475732.424856, type 3 (Absolute), code 54 (Position Y), value 9584
Event: time 1321475732.424881, -------------- Report Sync ------------
Event: time 1321475732.431813, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.431813, type 3 (Absolute), code 53 (Position X), value 20272
Event: time 1321475732.431828, type 3 (Absolute), code 0 (X), value 20272
Event: time 1321475732.431830, -------------- Report Sync ------------
Event: time 1321475732.433834, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.433834, type 3 (Absolute), code 53 (Position X), value 21040
Event: time 1321475732.433847, -------------- Report Sync ------------
Event: time 1321475732.438799, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.438799, type 3 (Absolute), code 53 (Position X), value 20288
Event: time 1321475732.438815, type 3 (Absolute), code 0 (X), value 20288
Event: time 1321475732.438816, -------------- Report Sync ------------
Event: time 1321475732.440797, type 3 (Absolute), code 47 (Slot), value 1
Event: time 1321475732.440798, type 3 (Absolute), code 53 (Position X), value 21056
Event: time 1321475732.440811, -------------- Report Sync ------------
Event: time 1321475732.446802, type 3 (Absolute), code 53 (Position X), value 21072
Event: time 1321475732.446815, -------------- Report Sync ------------
Event: time 1321475732.452804, type 3 (Absolute), code 47 (Slot), value 0
Event: time 1321475732.452804, type 3 (Absolute), code 53 (Position X), value 20304
Event: time 1321475732.452820, type 3 (Absolute), code 0 (X), value 20304
Event: time 1321475732.452821, -------------- Report Sync --------

[-- Attachment #3: diff_jikos_new.patch --]
[-- Type: text/plain, Size: 6216 bytes --]

--- hid-multitouch.c-orig	2011-11-16 21:42:52.000000000 +0100
+++ /usr/src/linux/drivers/hid/hid-multitouch.c	2011-11-16 20:55:01.000000000 +0100
@@ -60,9 +60,19 @@
 	bool seen_in_this_frame;/* has this slot been updated */
 };
 
+struct mt_class {
+	__s32 name;	/* MT_CLS */
+	__s32 quirks;
+	__s32 sn_move;	/* Signal/noise ratio for move events */
+	__s32 sn_width;	/* Signal/noise ratio for width events */
+	__s32 sn_height;	/* Signal/noise ratio for height events */
+	__s32 sn_pressure;	/* Signal/noise ratio for pressure events */
+	__u8 maxcontacts;
+};
+
 struct mt_device {
 	struct mt_slot curdata;	/* placeholder of incoming data */
-	struct mt_class *mtclass;	/* our mt device class */
+	struct mt_class mtclass;	/* our mt device class */
 	unsigned last_field_index;	/* last field index of the report */
 	unsigned last_slot_field;	/* the last field of a slot */
 	int last_mt_collection;	/* last known mt-related collection */
@@ -74,16 +84,6 @@
 	struct mt_slot *slots;
 };
 
-struct mt_class {
-	__s32 name;	/* MT_CLS */
-	__s32 quirks;
-	__s32 sn_move;	/* Signal/noise ratio for move events */
-	__s32 sn_width;	/* Signal/noise ratio for width events */
-	__s32 sn_height;	/* Signal/noise ratio for height events */
-	__s32 sn_pressure;	/* Signal/noise ratio for pressure events */
-	__u8 maxcontacts;
-};
-
 /* classes of device behavior */
 #define MT_CLS_DEFAULT				0x0001
 
@@ -98,6 +98,7 @@
 #define MT_CLS_3M				0x0101
 #define MT_CLS_CYPRESS				0x0102
 #define MT_CLS_EGALAX				0x0103
+#define MT_CLS_EGALAX_SERIAL			0x0104
 
 #define MT_DEFAULT_MAXCONTACT	10
 
@@ -177,10 +178,97 @@
 		.sn_move = 4096,
 		.sn_pressure = 32,
 	},
+	{ .name = MT_CLS_EGALAX_SERIAL,
+		.quirks = MT_QUIRK_SLOT_IS_CONTACTID |
+			MT_QUIRK_ALWAYS_VALID,
+		.sn_move = 4096,
+		.sn_pressure = 32
+	},
 
 	{ }
 };
 
+static ssize_t mt_show_quirks(struct device *dev,
+			   struct device_attribute *attr,
+			   char *buf)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	return sprintf(buf, "%u\n", td->mtclass.quirks);
+}
+
+static ssize_t mt_set_quirks(struct device *dev,
+			  struct device_attribute *attr,
+			  const char *buf, size_t count)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	unsigned long val;
+
+	if (strict_strtoul(buf, 0, &val))
+		return -EINVAL;
+
+	td->mtclass.quirks = val;
+
+	return count;
+}
+
+static DEVICE_ATTR(quirks, S_IWUSR | S_IRUGO, mt_show_quirks, mt_set_quirks);
+
+static ssize_t mt_show_class(struct device *dev,
+			   struct device_attribute *attr,
+			   char *buf)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+
+	return sprintf(buf, "0x%x\n", td->mtclass.name);
+}
+
+static ssize_t mt_set_class(struct device *dev,
+			  struct device_attribute *attr,
+			  const char *buf, size_t count)
+{
+	struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+	struct mt_device *td = hid_get_drvdata(hdev);
+	struct mt_class *mtclass = NULL; /* MT_CLS_DEFAULT */
+	int i;
+
+	unsigned long val;
+
+	if (strict_strtoul(buf, 0, &val))
+		return -EINVAL;
+
+
+	for (i = 0; mt_classes[i].name ; i++) {
+		if (val == mt_classes[i].name) {
+			mtclass = &(mt_classes[i]);
+			break;
+		}
+	}
+
+	if (!mtclass)
+		return -EINVAL;
+
+	td->mtclass = *mtclass;
+
+	return count;
+}
+
+static DEVICE_ATTR(class, S_IWUSR | S_IRUGO, mt_show_class, mt_set_class);
+
+static struct attribute *sysfs_attrs[] = {
+	&dev_attr_quirks.attr,
+	&dev_attr_class.attr,
+	NULL
+};
+
+static struct attribute_group mt_attribute_group = {
+	.attrs = sysfs_attrs
+};
+
 static void mt_feature_mapping(struct hid_device *hdev,
 		struct hid_field *field, struct hid_usage *usage)
 {
@@ -192,9 +280,9 @@
 		break;
 	case HID_DG_CONTACTMAX:
 		td->maxcontacts = field->value[0];
-		if (td->mtclass->maxcontacts)
+		if (td->mtclass.maxcontacts)
 			/* check if the maxcontacts is given by the class */
-			td->maxcontacts = td->mtclass->maxcontacts;
+			td->maxcontacts = td->mtclass.maxcontacts;
 
 		break;
 	}
@@ -214,7 +302,7 @@
 		unsigned long **bit, int *max)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
-	struct mt_class *cls = td->mtclass;
+	struct mt_class *cls = &td->mtclass;
 	__s32 quirks = cls->quirks;
 
 	/* Only map fields from TouchScreen or TouchPad collections.
@@ -363,7 +451,7 @@
 
 static int mt_compute_slot(struct mt_device *td)
 {
-	__s32 quirks = td->mtclass->quirks;
+	__s32 quirks = td->mtclass.quirks;
 
 	if (quirks & MT_QUIRK_SLOT_IS_CONTACTID)
 		return td->curdata.contactid;
@@ -407,7 +495,7 @@
 
 	for (i = 0; i < td->maxcontacts; ++i) {
 		struct mt_slot *s = &(td->slots[i]);
-		if ((td->mtclass->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) &&
+		if ((td->mtclass.quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) &&
 			!s->seen_in_this_frame) {
 			s->touch_state = false;
 		}
@@ -444,7 +532,7 @@
 				struct hid_usage *usage, __s32 value)
 {
 	struct mt_device *td = hid_get_drvdata(hid);
-	__s32 quirks = td->mtclass->quirks;
+	__s32 quirks = td->mtclass.quirks;
 
 	if (hid->claimed & HID_CLAIMED_INPUT && td->slots) {
 		switch (usage->hid) {
@@ -552,7 +640,7 @@
 		dev_err(&hdev->dev, "cannot allocate multitouch data\n");
 		return -ENOMEM;
 	}
-	td->mtclass = mtclass;
+	td->mtclass = *mtclass;
 	td->inputmode = -1;
 	td->last_mt_collection = -1;
 	hid_set_drvdata(hdev, td);
@@ -574,6 +662,8 @@
 		goto fail;
 	}
 
+	ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
+
 	mt_set_input_mode(hdev);
 
 	return 0;
@@ -594,6 +684,7 @@
 static void mt_remove(struct hid_device *hdev)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
+	sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group);
 	hid_hw_stop(hdev);
 	kfree(td->slots);
 	kfree(td);
@@ -662,6 +753,9 @@
 	{  .driver_data = MT_CLS_EGALAX,
 		HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
 			USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) },
+	{  .driver_data = MT_CLS_EGALAX_SERIAL,
+		HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
+			USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) },
 
 	/* Elo TouchSystems IntelliTouch Plus panel */
 	{ .driver_data = MT_CLS_DUAL_NSMU_CONTACTID,

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

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 20:48               ` Cedric Sodhi
@ 2011-11-16 21:22                 ` Benjamin Tissoires
  2011-11-17  6:58                   ` Cedric Sodhi
  2011-11-16 21:23                 ` Chris Bagwell
  1 sibling, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2011-11-16 21:22 UTC (permalink / raw)
  To: Cedric Sodhi; +Cc: Chris Bagwell, linux-input, linuxwacom-devel

Hi Chris,

it looks like the quirks were not taken into account.
Normally, you don't need to manually add the VID:PID with the sysfs as
you already registered your device in the list.

1) What is the value of the quirks sysfs attrib ? (according to your
logs, it should show 1, instead of 18)

2) did you do depmod and are you sure the hid-multitouch module loaded
is the one with USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5?
to be sure, please provide the outputs of:
$ modinfo hid-multitouch
$ modinfo <path to jiri-hid>/drivers/hid/hid-multitouch.ko

If you added your device through the sysfs because it was not taken by
hid-multitouch, replace the last parameter by 104:
$ echo 3 0eef a001 104 > new_id
But again, this is not the right way as you registered it.

Cheers,
Benjamin


On Wed, Nov 16, 2011 at 21:48, Cedric Sodhi <manday@gmx.net> wrote:
> Dear Benjamin,
>
> I applied your patch tp 3.2-jikos (uname shows 3.1, though). The
> diff to jikos' original is now [attached].
>
> Chris says the output of evtest still signifies problems with
> multitouch:
>
>> > http://ompldr.org/iYmIzYw
>>
>> Cedric, can you send these logs to Benjamin for ideas?  The HID events
>> look good but the evtest log for 2 fingers is not.  The two touches
>> are fighting each other.  That "-1" value is interrupted as each
>> finger is being lifted in between each new X/Y report.
>>
>> Also, can you send me and Benjamin the source code diff of what your
>> testing against kernel tree?
>>
>> The behavior in your evtest log looks like what would happen if your
>> setting the MT_QUIRK_NOT_SEEN_MEANS_UP.  Since your HW only sends 1
>> fingers worth of data per packet, you do not want that quirk.
>>
>> I'll still hold off on xf86-input-wacom issues until the events coming
>> are sane.  Your current events will cause xf86-input-wacom to do all
>> kinds of weird stuff thats not worth effort to weed threw.
>>
>> Chris
>
> These logs in that tarfile were created while still manually adding the
> ID via your sysfs interface. You find yet another evtest log for
> two-finger touch attached.
>
> Cedric
>
--
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] 13+ messages in thread

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 20:48               ` Cedric Sodhi
  2011-11-16 21:22                 ` Benjamin Tissoires
@ 2011-11-16 21:23                 ` Chris Bagwell
  2011-11-17  6:59                   ` Cedric Sodhi
  1 sibling, 1 reply; 13+ messages in thread
From: Chris Bagwell @ 2011-11-16 21:23 UTC (permalink / raw)
  To: Cedric Sodhi; +Cc: Benjamin Tissoires, linux-input, linuxwacom-devel

One update on my side.  I was looking at hid-multitouch.c from
Dmitri's next branch and didn't see that ALWAYS_VALID.  So I thought
it was a typo and manually mapping your "18" value to
VALID_IS_INRANGE; which we were previously setting it to.  Thats why I
mentioned I thought you were setting to same quirks.

Thanks for diff.  Often a diff is worth a thousand words.

OK, now back to your email.  I'm confused about your logs.  The URL
points to the tar file with multiple logs and the evtest_twofinger.log
inside it is the one I was talking about having issues.

Now you've attached a new evtest_twofinger.log and its values look
good.  So your saying this new log is from a version based on the
diff?

If so, I'll chalk it up to some debug issue and sounds like
ALWAYS_VALID is indeed the key to this.

Chris

On Wed, Nov 16, 2011 at 2:48 PM, Cedric Sodhi <manday@gmx.net> wrote:
> Dear Benjamin,
>
> I applied your patch tp 3.2-jikos (uname shows 3.1, though). The
> diff to jikos' original is now [attached].
>
> Chris says the output of evtest still signifies problems with
> multitouch:
>
>> > http://ompldr.org/iYmIzYw
>>
>> Cedric, can you send these logs to Benjamin for ideas?  The HID events
>> look good but the evtest log for 2 fingers is not.  The two touches
>> are fighting each other.  That "-1" value is interrupted as each
>> finger is being lifted in between each new X/Y report.
>>
>> Also, can you send me and Benjamin the source code diff of what your
>> testing against kernel tree?
>>
>> The behavior in your evtest log looks like what would happen if your
>> setting the MT_QUIRK_NOT_SEEN_MEANS_UP.  Since your HW only sends 1
>> fingers worth of data per packet, you do not want that quirk.
>>
>> I'll still hold off on xf86-input-wacom issues until the events coming
>> are sane.  Your current events will cause xf86-input-wacom to do all
>> kinds of weird stuff thats not worth effort to weed threw.
>>
>> Chris
>
> These logs in that tarfile were created while still manually adding the
> ID via your sysfs interface. You find yet another evtest log for
> two-finger touch attached.
>
> Cedric
>
--
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] 13+ messages in thread

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 21:22                 ` Benjamin Tissoires
@ 2011-11-17  6:58                   ` Cedric Sodhi
  0 siblings, 0 replies; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-17  6:58 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Chris Bagwell, linux-input, linuxwacom-devel

On Wed, Nov 16, 2011 at 10:22:58PM +0100, Benjamin Tissoires wrote:
> Hi Chris,
> 
> it looks like the quirks were not taken into account.
> Normally, you don't need to manually add the VID:PID with the sysfs as
> you already registered your device in the list.

Assuming that it was me who you were addressing: I'm aware of that. As
the diff shows, I added the device to the "hardcoded" whitelist as
MULTITOUCH5, using the quirks SLOT_IS_CONTACTID and ALWAYS_VALID.
> 
> 1) What is the value of the quirks sysfs attrib ? (according to your
> logs, it should show 1, instead of 18)

Cat'ing quirks returns 18. Conclusion ahead: I think I must have taken
those logs in the TAR file before I added the device to the whitelist
and then forgot to write out the quirks to sysfs, while manually adding
it.

> 
> 2) did you do depmod and are you sure the hid-multitouch module loaded
> is the one with USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5?
> to be sure, please provide the outputs of:
> $ modinfo hid-multitouch
> $ modinfo <path to jiri-hid>/drivers/hid/hid-multitouch.ko
> 
> If you added your device through the sysfs because it was not taken by
> hid-multitouch, replace the last parameter by 104:
> $ echo 3 0eef a001 104 > new_id
> But again, this is not the right way as you registered it.
> 

Therefore, no, everything seems to work now. The device is picked up
through the patch and, according to Chris, returns the correct values.

The log which I attached to my last email was the one I took after
making the changes to the code. I forgot to specify that.

Cedric

> Cheers,
> Benjamin
> 
> 
> On Wed, Nov 16, 2011 at 21:48, Cedric Sodhi <manday@gmx.net> wrote:
> > Dear Benjamin,
> >
> > I applied your patch tp 3.2-jikos (uname shows 3.1, though). The
> > diff to jikos' original is now [attached].
> >
> > Chris says the output of evtest still signifies problems with
> > multitouch:
> >
> >> > http://ompldr.org/iYmIzYw
> >>
> >> Cedric, can you send these logs to Benjamin for ideas?  The HID events
> >> look good but the evtest log for 2 fingers is not.  The two touches
> >> are fighting each other.  That "-1" value is interrupted as each
> >> finger is being lifted in between each new X/Y report.
> >>
> >> Also, can you send me and Benjamin the source code diff of what your
> >> testing against kernel tree?
> >>
> >> The behavior in your evtest log looks like what would happen if your
> >> setting the MT_QUIRK_NOT_SEEN_MEANS_UP.  Since your HW only sends 1
> >> fingers worth of data per packet, you do not want that quirk.
> >>
> >> I'll still hold off on xf86-input-wacom issues until the events coming
> >> are sane.  Your current events will cause xf86-input-wacom to do all
> >> kinds of weird stuff thats not worth effort to weed threw.
> >>
> >> Chris
> >
> > These logs in that tarfile were created while still manually adding the
> > ID via your sysfs interface. You find yet another evtest log for
> > two-finger touch attached.
> >
> > Cedric
> >
--
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] 13+ messages in thread

* Re: HID: Dead ./debug/hid/xxx/events
  2011-11-16 21:23                 ` Chris Bagwell
@ 2011-11-17  6:59                   ` Cedric Sodhi
  0 siblings, 0 replies; 13+ messages in thread
From: Cedric Sodhi @ 2011-11-17  6:59 UTC (permalink / raw)
  To: Chris Bagwell; +Cc: Benjamin Tissoires, linux-input, linuxwacom-devel

On Wed, Nov 16, 2011 at 03:23:50PM -0600, Chris Bagwell wrote:
> One update on my side.  I was looking at hid-multitouch.c from
> Dmitri's next branch and didn't see that ALWAYS_VALID.  So I thought
> it was a typo and manually mapping your "18" value to
> VALID_IS_INRANGE; which we were previously setting it to.  Thats why I
> mentioned I thought you were setting to same quirks.
> 
> Thanks for diff.  Often a diff is worth a thousand words.
> 
> OK, now back to your email.  I'm confused about your logs.  The URL
> points to the tar file with multiple logs and the evtest_twofinger.log
> inside it is the one I was talking about having issues.

Indeed. Those logs in the TAR file were created when I was still
manually adding the device to sysfs (that is, before that very diff
which includes changes to the whitelist). It looks like I neglected to
set the quirks back then. Sorry.

> 
> Now you've attached a new evtest_twofinger.log and its values look
> good.  So your saying this new log is from a version based on the
> diff?

Exactly.

Cedric

> If so, I'll chalk it up to some debug issue and sounds like
> ALWAYS_VALID is indeed the key to this.
> 
> Chris
> 
> On Wed, Nov 16, 2011 at 2:48 PM, Cedric Sodhi <manday@gmx.net> wrote:
> > Dear Benjamin,
> >
> > I applied your patch tp 3.2-jikos (uname shows 3.1, though). The
> > diff to jikos' original is now [attached].
> >
> > Chris says the output of evtest still signifies problems with
> > multitouch:
> >
> >> > http://ompldr.org/iYmIzYw
> >>
> >> Cedric, can you send these logs to Benjamin for ideas?  The HID events
> >> look good but the evtest log for 2 fingers is not.  The two touches
> >> are fighting each other.  That "-1" value is interrupted as each
> >> finger is being lifted in between each new X/Y report.
> >>
> >> Also, can you send me and Benjamin the source code diff of what your
> >> testing against kernel tree?
> >>
> >> The behavior in your evtest log looks like what would happen if your
> >> setting the MT_QUIRK_NOT_SEEN_MEANS_UP.  Since your HW only sends 1
> >> fingers worth of data per packet, you do not want that quirk.
> >>
> >> I'll still hold off on xf86-input-wacom issues until the events coming
> >> are sane.  Your current events will cause xf86-input-wacom to do all
> >> kinds of weird stuff thats not worth effort to weed threw.
> >>
> >> Chris
> >
> > These logs in that tarfile were created while still manually adding the
> > ID via your sysfs interface. You find yet another evtest log for
> > two-finger touch attached.
> >
> > Cedric
> >
> --
> 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] 13+ messages in thread

end of thread, other threads:[~2011-11-17  7:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16  9:50 HID: Dead ./debug/hid/xxx/events Cedric Sodhi
2011-11-16 10:17 ` Benjamin Tissoires
2011-11-16 10:25   ` Cedric Sodhi
2011-11-16 13:41     ` Chris Bagwell
2011-11-16 14:55       ` Cedric Sodhi
2011-11-16 15:40         ` Cedric Sodhi
2011-11-16 16:15           ` Chris Bagwell
2011-11-16 17:01             ` Benjamin Tissoires
2011-11-16 20:48               ` Cedric Sodhi
2011-11-16 21:22                 ` Benjamin Tissoires
2011-11-17  6:58                   ` Cedric Sodhi
2011-11-16 21:23                 ` Chris Bagwell
2011-11-17  6:59                   ` Cedric Sodhi

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).