All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chase Douglas <chase.douglas@canonical.com>
To: Michael Poole <mdpoole@troilus.org>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 5/6] HID: magicmouse: enable Magic Trackpad support
Date: Tue, 31 Aug 2010 13:54:49 -0400	[thread overview]
Message-ID: <1283277289.2255.63.camel@mini> (raw)
In-Reply-To: <1283228806.14419.63.camel@graviton>

On Tue, 2010-08-31 at 00:26 -0400, Michael Poole wrote:
> On Mon, 2010-08-30 at 13:20 -0400, Chase Douglas wrote:
> > The trackpad speaks a similar, but different, protocol from the magic
> > mouse. However, only small code tweaks here and there are needed to make
> > basic multitouch work.
> > 
> > Extra logic is required for single-touch emulation of the touchpad. The
> > changes made here take the approach that only one finger may emulate the
> > single pointer when multiple fingers have touched the screen. Once that
> > finger is raised, all touches must be raised before any further single
> > touch events can be sent.
> > 
> > Sometimes the magic trackpad sends two distinct touch reports as one big
> > report. Simply splitting the packet in two and resending them through
> > magicmouse_raw_event ensures they are handled properly.
> > 
> > I also added myself to the copyright statement.
> > 
> > Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
> 
> I have no technical concerns with the patch, just two questions.  (Once
> I get the chance to test it, I expect to add my Acked-by.)

<snip>
  
> > -		if (report_touches) {
> > -			last_up = 1;
> > -			for (ii = 0; ii < ARRAY_SIZE(msc->touches); ii++) {
> > -				if (msc->touches[ii].down) {
> > -					last_up = 0;
> > -					msc->touches[ii].down = 0;
> > -				}
> > -			}
> > -			if (last_up) {
> > -				input_mt_sync(input);
> > -			}
> > -		}
> > -
> 
> Maybe it is worth making magicmouse_emit_touch() return non-zero if the
> touch is down, so that "last_up" can be accumulated in a single pass
> (and we can remove the "down" field of the touch)?  I think that should
> be a separate commit, if the idea makes sense to you.

That makes sense to me without diving into the code. I don't really have
the time to work on it right now though, so is it ok if these patches
are applied first?

<snip>

> > @@ -388,12 +473,29 @@ static struct feature mouse_features[] = {
> >  	{ { 0xf8, 0x01, 0x32 }, 3 }
> >  };
> >  
> > +static struct feature trackpad_features[] = {
> > +	{ { 0xf1, 0xdb }, 2 },
> > +	{ { 0xf1, 0xdc }, 2 },
> > +	{ { 0xf0, 0x00 }, 2 },
> > +	{ { 0xf1, 0xdd }, 2 },
> > +	{ { 0xf0, 0x02 }, 2 },
> > +	{ { 0xf1, 0xc8 }, 2 },
> > +	{ { 0xf0, 0x09 }, 2 },
> > +	{ { 0xf1, 0xdc }, 2 },
> > +	{ { 0xf0, 0x00 }, 2 },
> > +	{ { 0xf1, 0xdd }, 2 },
> > +	{ { 0xf0, 0x02 }, 2 },
> > +	{ { 0xd7, 0x01 }, 2 },
> > +};
> > +
> 
> As I mentioned in another email, only the last entry here is required to
> turn on multitouch reports.  Do you know what the other entries do?

No clue. I just copied what OS X was sending to the device. It works for
myself and others, so I haven't messed with it.

Thanks,

-- Chase


  parent reply	other threads:[~2010-08-31 17:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 17:20 [PATCH 1/6] HID: magicmouse: don't allow hidinput to initialize Chase Douglas
2010-08-30 17:20 ` [PATCH 2/6] HID: magicmouse: move features reports to static array Chase Douglas
2010-08-31  3:52   ` Michael Poole
2010-08-30 17:20 ` [PATCH 3/6] HID: magicmouse: simplify touch data bit manipulation Chase Douglas
2010-08-31  3:55   ` Michael Poole
2010-08-30 17:20 ` [PATCH 4/6] HID: magicmouse: remove axis data filtering Chase Douglas
2010-08-31  3:59   ` Michael Poole
2010-08-31 17:57     ` Chase Douglas
2010-08-30 17:20 ` [PATCH 5/6] HID: magicmouse: enable Magic Trackpad support Chase Douglas
2010-08-31  4:26   ` Michael Poole
2010-08-31  4:36     ` Michael Poole
2010-08-31 17:55       ` Chase Douglas
2010-08-31 17:54     ` Chase Douglas [this message]
2010-08-30 17:20 ` [PATCH 6/6] HID: magicmouse: Adjust major / minor axes to scale Chase Douglas
2010-08-31  4:28   ` Michael Poole
2010-08-31  3:46 ` [PATCH 1/6] HID: magicmouse: don't allow hidinput to initialize Michael Poole
2010-08-31 11:30   ` Michael Poole
2010-08-31 13:42     ` Chase Douglas
2010-08-31 17:49     ` Chase Douglas

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=1283277289.2255.63.camel@mini \
    --to=chase.douglas@canonical.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=mdpoole@troilus.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.