linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Gamari <bgamari.foss@gmail.com>
To: dturvene <dturvene@dahetral.com>, James <james@madingley.org>
Cc: Ignacio Casal Quinteiro <nacho.resa@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: New Alps protocol in the wild?
Date: Fri, 17 Aug 2012 13:04:40 -0400	[thread overview]
Message-ID: <87zk5ta1qv.fsf@gmail.com> (raw)
In-Reply-To: <502E756C.4080509@dahetral.com>

dturvene <dturvene@dahetral.com> writes:

> Ben -
>
> I tried your fix on a Dell Inspiron 15R N5110 (I15R).  It did not work.  
> Things I noticed:
>
> 1) Consistent with prior observations, the touchpad E7 signature for it 
> is: 0x73 0x03 0x50, different than yours on the E6230.
>
Alright. Good to know.

> 2) Your alps_hw_init_v5 sequence does not work for my I15R.  I noticed 
> that the sequence enters/exits command mode a couple times. Why not 
> enter once, do the init and then exit?
>
Frankly, I didn't put much (honestly, any) time into figuring out the
meaning behind command sequence. I grabbed a dump from the VM and
implemented exactly what the Windows driver did. At that point I was
under the impression I was dealing with an entirely new protocol so it
didn't make much sense to put time into reasoning out the command
structure. Given the v3 report format is used I should revisit
this. I'll hopefully have a chance to do this this weekend. Given you
seem to recognize the command structure, you could probably do this even
faster than me. Take a stab at it if you feel so inclined. Pull requests
accepted.

> 3) When in command mode, the I15R accurately sets and retrieves 
> registers (e.g. 0x0008 returns 0x00 0x08 0x02).  When not in command 
> mode, all register reads return -1.  Oddly, the check in 
> alps_enter_command_mode is 0x73 0x01 rather than 0x88 0x07.
>
> So I think either I'm doing something wrong or I'm dealing with YAAP 
> (Yet Another ALPS Protocol).
>
Hopefully not.

> My question:  how did you get the protocol trace?  I think you said 
> previously that the drive does some direct register I/O.  I couldn't see 
> anything beyond PS/2 commands running under Virtual Box.
>
I used Seth Foreshee's method[1] under Qemu. Note that the Alps driver
for the E6230 (and, given the behavior you see, likely your machine as
well) checks for the presence of an entry in the ACPI DSDT (if not
present, the driver falls back onto generic PS/2 behavior).
Consequently, you may need to do some editing of the Qemu DSDT as
pointed out earlier in this thread by James (Message-Id:
<20120814103553.GF23370@arianrhod.panaceas.james.local>) I'm not
terribly familiar with ACPI, I'll defer to him to explain precisely how
he determined the relevant sections.

Cheers,

- Ben


[1] http://swapspace.forshee.me/2011/11/touchpad-protocol-reverse-engineering.html


  reply	other threads:[~2012-08-17 17:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 16:18 New Alps protocol in the wild? Ben Gamari
2012-07-27 16:52 ` Seth Forshee
2012-07-27 17:17   ` Ben Gamari
2012-07-27 19:15     ` dturvene
2012-07-30  8:43       ` Jiri Kosina
2012-07-30 16:19 ` Ben Gamari
2012-07-31  5:19   ` Ben Gamari
2012-07-31  6:01     ` Dmitry Torokhov
2012-07-31 20:50       ` Ben Gamari
2012-07-31 19:17     ` Ben Gamari
2012-08-14 10:35     ` James
2012-08-14 16:01       ` Ben Gamari
2012-08-14 16:15         ` Seth Forshee
     [not found]         ` <20120814160519.GC12473@artemis.panaceas.org>
2012-08-15  5:49           ` Ben Gamari
2012-08-16  5:04             ` Ben Gamari
2012-08-17 16:46               ` dturvene
2012-08-17 17:04                 ` Ben Gamari [this message]
2012-09-08 12:51                   ` dturvene
2012-09-10 20:35                     ` Ben Gamari
2012-09-15 20:49                     ` dturvene
     [not found]                       ` <CAPtp-N_PbGABwC7PtNtEe7bitc=yg1oV2M6cK6Wb1PkVq6wa9A@mail.gmail.com>
2012-09-30 17:33                         ` dturvene

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=87zk5ta1qv.fsf@gmail.com \
    --to=bgamari.foss@gmail.com \
    --cc=dturvene@dahetral.com \
    --cc=james@madingley.org \
    --cc=linux-input@vger.kernel.org \
    --cc=nacho.resa@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).