All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Isaacson <adi@hexapodia.org>
To: Matthew Chapman <matthewc@cse.unsw.edu.au>
Cc: Alexander Hofbauer <alex@derhofbauer.at>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch]
Date: Mon, 23 Feb 2009 16:16:12 -0800	[thread overview]
Message-ID: <20090224001612.GA18077@hexapodia.org> (raw)
In-Reply-To: <20081208141438.GA30462@cse.unsw.EDU.AU>

On Tue, Dec 09, 2008 at 01:14:38AM +1100, Matthew Chapman wrote:
> Hi,
> 
> Here's a patch that implements the 9-byte packet format, which solves
> the problem for me.
> 
> Matt

Matt,

Your patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=12577 for
me.  Would you consider resending it to linux-input@ with your
Signed-off-by?

Thanks,
-andy

> --- linux-2.6.27/drivers/input/mouse/alps.c	2008-12-09 00:31:48.000000000 +1100
> +++ linux-2.6.27.alps/drivers/input/mouse/alps.c	2008-12-09 01:08:09.000000000 +1100
> @@ -100,6 +100,19 @@
>  		return;
>  	}
>  
> +	if ((packet[3] & 0xf) == 0xf) {
> +		/* 9-byte packet format seen on some DualPoints */
> +		/* handle relative update and then fall through for remainder */
> +		input_report_rel(dev2, REL_X,
> +			packet[4] ? packet[4] - ((packet[3] << 4) & 0x100) : 0);
> +		input_report_rel(dev2, REL_Y,
> +			packet[5] ? ((packet[3] << 3) & 0x100) - packet[5] : 0);
> +		input_sync(dev2);
> +		packet[3] = packet[6];
> +		packet[4] = packet[7];
> +		packet[5] = packet[8];
> +	}
> +
>  	if (priv->i->flags & ALPS_OLDPROTO) {
>  		left = packet[2] & 0x10;
>  		right = packet[2] & 0x08;
> @@ -197,6 +210,21 @@
>  	if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
>  		return PSMOUSE_BAD_DATA;
>  
> +	if ((psmouse->pktcnt >= 4) && ((psmouse->packet[3] & 0xf) == 0xf))
> +	{
> +		/* 9-byte packet format seen on some DualPoints */
> +		/* Bytes 7 - 9 should have 0 in the highest bit */
> +		if ((psmouse->pktcnt >= 7) && (psmouse->pktcnt <= 9) &&
> +		    (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> +			return PSMOUSE_BAD_DATA;
> +
> +		if (psmouse->pktcnt == 9) {
> +			alps_process_packet(psmouse);
> +			return PSMOUSE_FULL_PACKET;
> +		}
> +		return PSMOUSE_GOOD_DATA;
> +	}
> +
>  	/* Bytes 2 - 6 should have 0 in the highest bit */
>  	if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
>  	    (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> --- linux-2.6.27/drivers/input/mouse/psmouse.h	2008-10-10 09:13:53.000000000 +1100
> +++ linux-2.6.27.alps/drivers/input/mouse/psmouse.h	2008-11-06 02:32:45.000000000 +1100
> @@ -42,7 +42,7 @@
>  	struct work_struct resync_work;
>  	char *vendor;
>  	char *name;
> -	unsigned char packet[8];
> +	unsigned char packet[9];
>  	unsigned char badbyte;
>  	unsigned char pktcnt;
>  	unsigned char pktsize;


      parent reply	other threads:[~2009-02-24  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 18:45 ALPS input driver problem with DualPoint on Dell E6400/E6500 Alexander Hofbauer
2008-12-08 14:14 ` ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch] Matthew Chapman
2008-12-08 19:06   ` Alexander Hofbauer
2009-02-24  0:16   ` Andy Isaacson [this message]

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=20090224001612.GA18077@hexapodia.org \
    --to=adi@hexapodia.org \
    --cc=alex@derhofbauer.at \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthewc@cse.unsw.edu.au \
    /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.