mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 劉嘉駿 <scott.liu@emc.com.tw>
To: "'Benjamin Tissoires'" <benjamin.tissoires@gmail.com>,
	"'Dmitry Torokhov'" <dmitry.torokhov@gmail.com>
Cc: "'Jian-Jhong Ding'" <jj_ding@emc.com.tw>,
	<linux-input@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, "'Jesse'" <jesse@emc.com.tw>,
	"'Vincent Wang'" <vincent.wang@emc.com.tw>,
	"'Paul'" <paul.liang@emc.com.tw>
Subject: RE: [PATCH v1] Support Elan Touchscreen eKTF product.
Date: Tue, 23 Oct 2012 11:55:03 +0800	[thread overview]
Message-ID: <0D7F874AD9DB4F96B90F6178C541B248@elan.corp> (raw)
In-Reply-To: <CAN+gG=HyzcRnp_Bd=WRq2Hn_5QKCVCjvFjXCvO1xXbAcyBOJfQ@mail.gmail.com>

Hi,

> -----Original Message-----
> From: Benjamin Tissoires [mailto:benjamin.tissoires@gmail.com]
> Sent: Tuesday, October 23, 2012 1:12 AM
> To: Dmitry Torokhov
> Cc: Jian-Jhong Ding; Scott Liu; linux-input@vger.kernel.org;
linux-i2c@vger.kernel.org;
> linux-kernel@vger.kernel.org; Jesse; Vincent Wang; Paul
> Subject: Re: [PATCH v1] Support Elan Touchscreen eKTF product.
> 
> On Mon, Oct 22, 2012 at 6:07 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Mon, Oct 22, 2012 at 11:47:42AM +0800, Jian-Jhong Ding wrote:
> >> Scott Liu <scott.liu@emc.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.
> 
It's an I2C device with ELAN own format, no HID packet transferring.

> 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).
> 
I think so; it would cause too much pain for reuse hid-multitouch.
BTW, I'll have checked Henrik's code to see if there are possible to reuse
some code.

Thanks,
Scott


> Cheers,
> Benjamin
> 
> >
> > Thanks.
> >
> > --
> > Dmitry


  reply	other threads:[~2012-10-23  3:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 21:57 Scott Liu
2012-10-22  3:47 ` Jian-Jhong Ding
2012-10-22 16:07   ` Dmitry Torokhov
2012-10-22 17:12     ` Benjamin Tissoires
2012-10-23  3:55       ` 劉嘉駿 [this message]
2012-10-23  2:14     ` Jian-Jhong Ding
2012-10-23  8:30       ` 劉嘉駿
2012-10-23  2:57   ` 劉嘉駿

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0D7F874AD9DB4F96B90F6178C541B248@elan.corp \
    --to=scott.liu@emc.com.tw \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jesse@emc.com.tw \
    --cc=jj_ding@emc.com.tw \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.liang@emc.com.tw \
    --cc=vincent.wang@emc.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®