lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Oct 2012 19:12:22 +0200
From:	Benjamin Tissoires <benjamin.tissoires@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Jian-Jhong Ding <jj_ding@....com.tw>,
	Scott Liu <scott.liu@....com.tw>, linux-input@...r.kernel.org,
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jesse <jesse@....com.tw>, Vincent Wang <vincent.wang@....com.tw>,
	Paul <paul.liang@....com.tw>
Subject: Re: [PATCH v1] Support Elan Touchscreen eKTF product.

On Mon, Oct 22, 2012 at 6:07 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> On Mon, Oct 22, 2012 at 11:47:42AM +0800, Jian-Jhong Ding wrote:
>> Scott Liu <scott.liu@....com.tw> writes:
>> > +
>> > +struct mt_device {
>> > +   struct mt_slot curdata; /* placeholder of incoming data */
>> > +   __u8 num_received;      /* how many contacts we received */
>> > +   __u8 num_expected;      /* expected last contact index */
>> > +   __u8 maxcontacts;
>> > +   bool curvalid;          /* is the current contact valid? */
>> > +   struct mt_slot *slots;
>> > +};
>>
>> With Benjamin's i2c-hid implimentation, is it possible to make
>> hid-multitouch not depend on USBHID and reuse it to drive this device?

We can already use hid-multitouch with hid over I2C devices (I'm
testing my i2c devices with this module).
But it's true that hid-multitouch depends on usbhid, and I the funny
think is that I was removing this dependency today.
The fact is that currently, i2c devices do not segfault with
hid-multitouch  because win8 devices do not require anymore to set
some feature at plug.

>
> Exactly. Before looking any further - is this the same part that Tom Lin
> posted a driver for earlier this summer?

I'm not Elan, and I can not be sure, but judging from the "hello
packets" and the other commands, I doubt this device is an I2C over
HID one.

Anyway, reusing hid-multitouch for this specific case seams to be a
little bit difficult. You would have first to provide a fake report
descriptor (or inject commands as if you were hid-core) and then, you
would have to reformat the incoming data into valid win7 (or 8)
packets. Judging by the functions elan_touch_parse_fid,
elan_touch_parse_wid and elants_parse_xy, the data seem to be mixed
(all the finger ids at the beginning, and not one per touch), so it is
definitively needed to recreate a valid HID packet.

So I'm not surprised with the duplicated code. However, Henrik did a
big job in kernel 3.7 to factorize mt code, and some part of the
duplication can be achieve with these functions (look at
input_mt_sync_frame and input_mt_get_slot_by_key for example).

Cheers,
Benjamin

>
> Thanks.
>
> --
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ