linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ALPS tapping disabled. WHY?
@ 2005-02-24 23:29 Ian E. Morgan
  2005-02-25  3:08 ` Dmitry Torokhov
  0 siblings, 1 reply; 10+ messages in thread
From: Ian E. Morgan @ 2005-02-24 23:29 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Trying out 2.6.11-rc5, I discovered my ALPS touchpad misbehaving. After
reading several threads related to the topic, noe seemed to resolve my
issue.

The pad has always worked fine as a plain PS/2 mouse, from 2.4.0 through
2.6.10.

This change fixes the problem by NOT disabling hardware tapping:

--- linux-2.6.11-rc5/drivers/input/mouse/alps.c~	2005-02-24 18:16:03.000000000 -0500
+++ linux-2.6.11-rc5/drivers/input/mouse/alps.c	2005-02-24 18:16:03.000000000 -0500
@@ -334,8 +334,8 @@
  	if (alps_get_status(psmouse, param))
  		return -1;

-	if (param[0] & 0x04)
-		alps_tap_mode(psmouse, 0);
+//	if (param[0] & 0x04)
+//		alps_tap_mode(psmouse, 0);

  	if (alps_absolute_mode(psmouse)) {
  		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
@@ -372,11 +372,11 @@
  		return -1;
  	}

-	if (param[0] & 0x04) {
-		printk(KERN_INFO "  Disabling hardware tapping\n");
-		if (alps_tap_mode(psmouse, 0))
-			printk(KERN_WARNING "alps.c: Failed to disable hardware tapping\n");
-	}
+//	if (param[0] & 0x04) {
+//		printk(KERN_INFO "  Disabling hardware tapping\n");
+//		if (alps_tap_mode(psmouse, 0))
+//			printk(KERN_WARNING "alps.c: Failed to disable hardware tapping\n");
+//	}

  	if (alps_absolute_mode(psmouse)) {
  		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");



So now, can anyone explain what bit 3 of param[0] does, and why you would
want to disable hardware tapping support when it's set? My pad (ALPS
56AAA1760C on a Sager NP8560V) has always worked with hardware tapping as a
plain PS/2 mouse, no special ALPS support req'd.

Can this disabling of hardware tapping support be made optional (boot time
param or other)? I don't want to have to patch every kernel from here on
out.

Regards,
Ian Morgan

-- 
-------------------------------------------------------------------
  Ian E. Morgan          Vice President & C.O.O.       Webcon, Inc.
  imorgan at webcon dot ca       PGP: #2DA40D07       www.webcon.ca
     *  Customized Linux Network Solutions for your Business  *
-------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ALPS tapping disabled. WHY?
  2005-02-24 23:29 ALPS tapping disabled. WHY? Ian E. Morgan
@ 2005-02-25  3:08 ` Dmitry Torokhov
  2005-02-27  7:50   ` Vojtech Pavlik
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Torokhov @ 2005-02-25  3:08 UTC (permalink / raw)
  To: Ian E. Morgan; +Cc: Linux Kernel Mailing List

On Thursday 24 February 2005 18:29, Ian E. Morgan wrote:
> Trying out 2.6.11-rc5, I discovered my ALPS touchpad misbehaving. After
> reading several threads related to the topic, noe seemed to resolve my
> issue.
> 
> The pad has always worked fine as a plain PS/2 mouse, from 2.4.0 through
> 2.6.10.
> 
> This change fixes the problem by NOT disabling hardware tapping:
> 
> --- linux-2.6.11-rc5/drivers/input/mouse/alps.c~	2005-02-24 18:16:03.000000000 -0500
> +++ linux-2.6.11-rc5/drivers/input/mouse/alps.c	2005-02-24 18:16:03.000000000 -0500
> @@ -334,8 +334,8 @@
>   	if (alps_get_status(psmouse, param))
>   		return -1;
> 
> -	if (param[0] & 0x04)
> -		alps_tap_mode(psmouse, 0);
> +//	if (param[0] & 0x04)
> +//		alps_tap_mode(psmouse, 0);
> 
>   	if (alps_absolute_mode(psmouse)) {
>   		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
> @@ -372,11 +372,11 @@
>   		return -1;
>   	}
> 
> -	if (param[0] & 0x04) {
> -		printk(KERN_INFO "  Disabling hardware tapping\n");
> -		if (alps_tap_mode(psmouse, 0))
> -			printk(KERN_WARNING "alps.c: Failed to disable hardware tapping\n");
> -	}
> +//	if (param[0] & 0x04) {
> +//		printk(KERN_INFO "  Disabling hardware tapping\n");
> +//		if (alps_tap_mode(psmouse, 0))
> +//			printk(KERN_WARNING "alps.c: Failed to disable hardware tapping\n");
> +//	}
> 
>   	if (alps_absolute_mode(psmouse)) {
>   		printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
> 
> 
> 
> So now, can anyone explain what bit 3 of param[0] does, and why you would
> want to disable hardware tapping support when it's set? My pad (ALPS
> 56AAA1760C on a Sager NP8560V) has always worked with hardware tapping as a
> plain PS/2 mouse, no special ALPS support req'd.
> 
> Can this disabling of hardware tapping support be made optional (boot time
> param or other)? I don't want to have to patch every kernel from here on
> out.
> 

It still should do software tap emulation (although support is a bit flakey
with ALPS I must admit, but there are patches that should improve it) - so
people who don't like tapping can deactivate it.

Anyway, "psmouse.proto=exps" boot option should disable ALPS native mode and
restore previous behavior.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ALPS tapping disabled. WHY?
  2005-02-25  3:08 ` Dmitry Torokhov
@ 2005-02-27  7:50   ` Vojtech Pavlik
  2005-02-28 22:23     ` Ian E. Morgan
  0 siblings, 1 reply; 10+ messages in thread
From: Vojtech Pavlik @ 2005-02-27  7:50 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Ian E. Morgan, Linux Kernel Mailing List

On Thu, Feb 24, 2005 at 10:08:15PM -0500, Dmitry Torokhov wrote:

> > So now, can anyone explain what bit 3 of param[0] does, and why you would
> > want to disable hardware tapping support when it's set? My pad (ALPS
> > 56AAA1760C on a Sager NP8560V) has always worked with hardware tapping as a
> > plain PS/2 mouse, no special ALPS support req'd.
> > 
> > Can this disabling of hardware tapping support be made optional (boot time
> > param or other)? I don't want to have to patch every kernel from here on
> > out.
> > 
> 
> It still should do software tap emulation (although support is a bit flakey
> with ALPS I must admit, but there are patches that should improve it) - so
> people who don't like tapping can deactivate it.
> 
> Anyway, "psmouse.proto=exps" boot option should disable ALPS native mode and
> restore previous behavior.

Also, in my tree currently (and planned for 2.6.12) hardware tapping is
enabled again, because double taps don't work otherwise (hardware
limitation).

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ALPS tapping disabled. WHY?
  2005-02-27  7:50   ` Vojtech Pavlik
@ 2005-02-28 22:23     ` Ian E. Morgan
  2005-03-01 11:40       ` David Ford
  0 siblings, 1 reply; 10+ messages in thread
From: Ian E. Morgan @ 2005-02-28 22:23 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Dmitry Torokhov, Linux Kernel Mailing List

On Sun, 27 Feb 2005, Vojtech Pavlik wrote:

> Also, in my tree currently (and planned for 2.6.12) hardware tapping is
> enabled again, because double taps don't work otherwise (hardware
> limitation).

You should really try to get that squeezed into 2.6.11 before it is
released, or else I would anticipate a LOT more people whining about their
broken touchpads.

Regards,
Ian Morgan

-- 
-------------------------------------------------------------------
  Ian E. Morgan          Vice President & C.O.O.       Webcon, Inc.
  imorgan at webcon dot ca       PGP: #2DA40D07       www.webcon.ca
     *  Customized Linux Network Solutions for your Business  *
-------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ALPS tapping disabled. WHY?
  2005-02-28 22:23     ` Ian E. Morgan
@ 2005-03-01 11:40       ` David Ford
  2005-03-01 11:54         ` Vojtech Pavlik
  0 siblings, 1 reply; 10+ messages in thread
From: David Ford @ 2005-03-01 11:40 UTC (permalink / raw)
  To: Ian E. Morgan; +Cc: Vojtech Pavlik, Dmitry Torokhov, Linux Kernel Mailing List

I would also appreciate the return of good resolution.  Blocky mouse 
startup moves make graphic editing rather difficult.  No mouse movement 
until I have moved my finger a significant distance then the mouse all 
of a sudden jumps a dozen pixels before it "smoothly" glides along.

I would also love to see the sync issues go away. :/  Whatever this 
patch(es) was supposed to accomplish, it introduced some rather 
undesirable side effects.  a) sync issues, b) tapping, c) fine grain 
movements, d) loss of scroll sliding as well (moving your finger along 
the side/bottom of the glidepoint).

Not griping, just providing feedback.

-david

Ian E. Morgan wrote:

> On Sun, 27 Feb 2005, Vojtech Pavlik wrote:
>
>> Also, in my tree currently (and planned for 2.6.12) hardware tapping is
>> enabled again, because double taps don't work otherwise (hardware
>> limitation).
>
>
> You should really try to get that squeezed into 2.6.11 before it is
> released, or else I would anticipate a LOT more people whining about 
> their
> broken touchpads.
>
> Regards,
> Ian Morgan
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ALPS tapping disabled. WHY?
  2005-03-01 11:40       ` David Ford
@ 2005-03-01 11:54         ` Vojtech Pavlik
  2005-03-04 21:02           ` New ALPS code in -mm Benoit Boissinot
  0 siblings, 1 reply; 10+ messages in thread
From: Vojtech Pavlik @ 2005-03-01 11:54 UTC (permalink / raw)
  To: David Ford; +Cc: Ian E. Morgan, Dmitry Torokhov, Linux Kernel Mailing List

On Tue, Mar 01, 2005 at 06:40:21AM -0500, David Ford wrote:
> I would also appreciate the return of good resolution.  Blocky mouse 
> startup moves make graphic editing rather difficult.  No mouse movement 
> until I have moved my finger a significant distance then the mouse all 
> of a sudden jumps a dozen pixels before it "smoothly" glides along.
> 
> I would also love to see the sync issues go away. :/  Whatever this 
> patch(es) was supposed to accomplish, it introduced some rather 
> undesirable side effects.  a) sync issues, b) tapping, c) fine grain 
> movements, d) loss of scroll sliding as well (moving your finger along 
> the side/bottom of the glidepoint).
> 
> Not griping, just providing feedback.
 
Can you check with a current -mm kernel whether any of the issues is
still there? Everything seems to work smoothly with my ALPS.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 10+ messages in thread

* New ALPS code in -mm
  2005-03-01 11:54         ` Vojtech Pavlik
@ 2005-03-04 21:02           ` Benoit Boissinot
  2005-03-04 21:13             ` Vojtech Pavlik
  0 siblings, 1 reply; 10+ messages in thread
From: Benoit Boissinot @ 2005-03-04 21:02 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Dmitry Torokhov, Linux Kernel Mailing List, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On Tue, 1 Mar 2005 12:54:32 +0100, Vojtech Pavlik <vojtech@suse.cz> wrote:
> 
> Can you check with a current -mm kernel whether any of the issues is
> still there? Everything seems to work smoothly with my ALPS.
> 

I have problems with ALPS and 2.6.11-mm1. If I move the pointer with
the touchpad, it activates button modifiers at the same time. (xev
reports a MotionNotify event with state = 0x600 or sometimes 0x200
instead of the expected 0x0).

Moreover the pointer sometimes jump at the bottom right of the screen.

It worked fine with 2.6.11-rc5-mm1.

relevant portion of dmesg:

- with rc5:

Linux version 2.6.11-rc5-mm1 (tonfa@casaverde) (gcc version
3.4.3-20050110 (Gentoo Linux 3.                4.3.20050110,
ssp-3.4.3.20050110-0, pie-8.7.7)) #2 Tue Mar 1 13:33:05 CET 2005
input: AT Translated Set 2 keyboard on isa0060/serio0
ALPS Touchpad (Dualpoint) detected
Enabling hardware tapping
input: AlpsPS/2 ALPS TouchPad on isa0060/serio1

- with .11

Linux version 2.6.11-mm1 (tonfa@casaverde) (gcc version 3.4.3-20050110
(Gentoo Linux 3.4.3.                20050110, ssp-3.4.3.20050110-0,
pie-8.7.7)) #5 Fri Mar 4 16:49:47 CET 2005
input: AT Translated Set 2 keyboard on isa0060/serio0
   Enabling hardware tapping
input: DualPoint Stick on isa0060/serio1
input: AlpsPS/2 ALPS DualPoint TouchPad on isa0060/serio1

I hope it can help.

Benoit

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lspci.log --]
[-- Type: text/x-log; name="lspci.log", Size: 5206 bytes --]

0000:00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
	Flags: bus master, fast devsel, latency 0
	Memory at e0000000 (32-bit, prefetchable)
	Capabilities: <available only to root>

0000:00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03) (prog-if 00 [Normal decode])
	Flags: bus master, 66Mhz, fast devsel, latency 32
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
	I/O behind bridge: 0000c000-0000cfff
	Memory behind bridge: fc000000-fdffffff
	Prefetchable memory behind bridge: e8000000-efffffff
	Expansion ROM at 0000c000 [disabled] [size=4K]

0000:00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Intel Corporation: Unknown device 4541
	Flags: bus master, medium devsel, latency 0, IRQ 11
	I/O ports at bf80 [size=32]

0000:00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Intel Corporation: Unknown device 4541
	Flags: bus master, medium devsel, latency 0, IRQ 11
	I/O ports at bf40 [size=32]

0000:00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) (prog-if 00 [UHCI])
	Subsystem: Intel Corporation: Unknown device 4541
	Flags: bus master, medium devsel, latency 0, IRQ 11
	I/O ports at bf20 [size=32]

0000:00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) (prog-if 20 [EHCI])
	Subsystem: Dell: Unknown device 011d
	Flags: bus master, medium devsel, latency 0, IRQ 11
	Memory at f4fffc00 (32-bit, non-prefetchable)
	Capabilities: <available only to root>

0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=32
	I/O behind bridge: 0000d000-0000efff
	Memory behind bridge: f6000000-fbffffff

0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
	Flags: bus master, medium devsel, latency 0

0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])
	Subsystem: Intel Corporation: Unknown device 4541
	Flags: bus master, medium devsel, latency 0, IRQ 11
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at <ignored>
	I/O ports at bfa0 [size=16]
	Memory at 20000000 (32-bit, non-prefetchable) [size=1K]

0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
	Subsystem: Dell: Unknown device 011d
	Flags: bus master, medium devsel, latency 0, IRQ 5
	I/O ports at b800
	I/O ports at bc40 [size=64]
	Memory at f4fff800 (32-bit, non-prefetchable) [size=512]
	Memory at f4fff400 (32-bit, non-prefetchable) [size=256]
	Capabilities: <available only to root>

0000:00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01) (prog-if 00 [Generic])
	Subsystem: Conexant: Unknown device 5422
	Flags: bus master, medium devsel, latency 0, IRQ 11
	I/O ports at b400
	I/O ports at b080 [size=128]
	Capabilities: <available only to root>

0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [FireGL 9000] (rev 02) (prog-if 00 [VGA])
	Subsystem: Dell: Unknown device 011d
	Flags: bus master, VGA palette snoop, stepping, 66Mhz, medium devsel, latency 32, IRQ 11
	Memory at e8000000 (32-bit, prefetchable)
	I/O ports at c000 [size=256]
	Memory at fcff0000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: <available only to root>

0000:02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705M Gigabit Ethernet (rev 01)
	Subsystem: Dell: Unknown device 865d
	Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 11
	Memory at faff0000 (64-bit, non-prefetchable)
	Capabilities: <available only to root>

0000:02:01.0 CardBus bridge: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller (rev 20)
	Subsystem: Dell: Unknown device 011d
	Flags: slow devsel, IRQ 255
	Memory at 20001000 (32-bit, non-prefetchable) [disabled]
	Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
	I/O window 0: 00000000-00000003 [disabled]
	I/O window 1: 00000000-00000003 [disabled]
	16-bit legacy interface ports at 0001

0000:02:01.1 CardBus bridge: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller (rev 20)
	Subsystem: Dell: Unknown device 011d
	Flags: slow devsel, IRQ 255
	Memory at 20002000 (32-bit, non-prefetchable) [disabled]
	Bus: primary=02, secondary=07, subordinate=0a, sec-latency=176
	I/O window 0: 00000000-00000003 [disabled]
	I/O window 1: 00000000-00000003 [disabled]
	16-bit legacy interface ports at 0001

0000:02:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)
	Subsystem: Intel Corporation: Unknown device 2722
	Flags: bus master, medium devsel, latency 32, IRQ 11
	Memory at fafef000 (32-bit, non-prefetchable)
	Capabilities: <available only to root>


[-- Attachment #3: config.gz --]
[-- Type: application/gzip, Size: 9034 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New ALPS code in -mm
  2005-03-04 21:02           ` New ALPS code in -mm Benoit Boissinot
@ 2005-03-04 21:13             ` Vojtech Pavlik
  2005-03-07  7:14               ` Daniel Barkalow
  0 siblings, 1 reply; 10+ messages in thread
From: Vojtech Pavlik @ 2005-03-04 21:13 UTC (permalink / raw)
  To: Benoit Boissinot
  Cc: Dmitry Torokhov, Linux Kernel Mailing List, Andrew Morton

On Fri, Mar 04, 2005 at 10:02:03PM +0100, Benoit Boissinot wrote:
> On Tue, 1 Mar 2005 12:54:32 +0100, Vojtech Pavlik <vojtech@suse.cz> wrote:
> > 
> > Can you check with a current -mm kernel whether any of the issues is
> > still there? Everything seems to work smoothly with my ALPS.
> > 
> 
> I have problems with ALPS and 2.6.11-mm1. If I move the pointer with
> the touchpad, it activates button modifiers at the same time. (xev
> reports a MotionNotify event with state = 0x600 or sometimes 0x200
> instead of the expected 0x0).
> 
> Moreover the pointer sometimes jump at the bottom right of the screen.
> 
> It worked fine with 2.6.11-rc5-mm1.
> 
> relevant portion of dmesg:
> 
> - with rc5:
> 
> Linux version 2.6.11-rc5-mm1 (tonfa@casaverde) (gcc version
> 3.4.3-20050110 (Gentoo Linux 3.                4.3.20050110,
> ssp-3.4.3.20050110-0, pie-8.7.7)) #2 Tue Mar 1 13:33:05 CET 2005
> input: AT Translated Set 2 keyboard on isa0060/serio0
> ALPS Touchpad (Dualpoint) detected
> Enabling hardware tapping
> input: AlpsPS/2 ALPS TouchPad on isa0060/serio1
> 
> - with .11
> 
> Linux version 2.6.11-mm1 (tonfa@casaverde) (gcc version 3.4.3-20050110
> (Gentoo Linux 3.4.3.                20050110, ssp-3.4.3.20050110-0,
> pie-8.7.7)) #5 Fri Mar 4 16:49:47 CET 2005
> input: AT Translated Set 2 keyboard on isa0060/serio0
>    Enabling hardware tapping
> input: DualPoint Stick on isa0060/serio1
> input: AlpsPS/2 ALPS DualPoint TouchPad on isa0060/serio1
> 
> I hope it can help.

Can you check if this patch helps?


ChangeSet@1.2068.1.2, 2005-03-04 20:19:05+01:00, vojtech@suse.cz
  input: Fix inverted conditions in ALPS DualPoint stick packet
         decoding.
ChangeSet@1.2072, 2005-03-04 21:55:23+01:00, vojtech@suse.cz
  input: Fix ALPS DualPoint stick buttons. Testing shows that they're
         at the same place as the pad ones, but packet has z==127.
  
 alps.c |   26 +++++++++---------------
 1 files changed, 10 insertions(+), 16 deletions(-)


diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
--- a/drivers/input/mouse/alps.c	2005-03-04 22:00:33 +01:00
+++ b/drivers/input/mouse/alps.c	2005-03-04 22:00:33 +01:00
@@ -124,8 +124,8 @@
 
 		/* Relative movement packet */
  		if (z == 127) {
-			input_report_rel(dev2, REL_X,  (x > 383 ? x : (x - 768)));
-			input_report_rel(dev2, REL_Y, -(y > 255 ? y : (x - 512)));
+			input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
+			input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));
 			input_sync(dev2);
 			return;
 		}
diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
--- a/drivers/input/mouse/alps.c	2005-03-04 22:00:49 +01:00
+++ b/drivers/input/mouse/alps.c	2005-03-04 22:00:49 +01:00
@@ -115,20 +115,14 @@
 	ges = packet[2] & 1;
 	fin = packet[2] & 2;
 
-	/* Dualpoint has stick buttons in byte 0 */
-	if (priv->i->flags & ALPS_DUALPOINT) {
-	
-		input_report_key(dev2, BTN_LEFT,    packet[0]       & 1);    
-		input_report_key(dev2, BTN_MIDDLE, (packet[0] >> 2) & 1);
-		input_report_key(dev2, BTN_RIGHT,  (packet[0] >> 1) & 1);
-
-		/* Relative movement packet */
- 		if (z == 127) {
-			input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
-			input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));
-			input_sync(dev2);
-			return;
-		}
+	if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
+		input_report_key(dev2, BTN_LEFT,   left);    
+		input_report_key(dev2, BTN_RIGHT,  right);
+		input_report_key(dev2, BTN_MIDDLE, middle);
+		input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
+		input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));
+		input_sync(dev2);
+		return;
 	}
 
 	/* Convert hardware tap to a reasonable Z value */

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New ALPS code in -mm
  2005-03-04 21:13             ` Vojtech Pavlik
@ 2005-03-07  7:14               ` Daniel Barkalow
  2005-03-07  7:30                 ` Vojtech Pavlik
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Barkalow @ 2005-03-07  7:14 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Benoit Boissinot, Dmitry Torokhov, Linux Kernel Mailing List,
	Andrew Morton

On Fri, 4 Mar 2005, Vojtech Pavlik wrote:

>  		/* Relative movement packet */
>   		if (z == 127) {
> -			input_report_rel(dev2, REL_X,  (x > 383 ? x : (x - 768)));
> -			input_report_rel(dev2, REL_Y, -(y > 255 ? y : (x - 512)));
> +			input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
> +			input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));

Not that I have any idea, but (y - 512) seems much more likely here.

> +	if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
> +		input_report_key(dev2, BTN_LEFT,   left);    
> +		input_report_key(dev2, BTN_RIGHT,  right);
> +		input_report_key(dev2, BTN_MIDDLE, middle);
> +		input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
> +		input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));

Also here.

	-Daniel
*This .sig left intentionally blank*


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New ALPS code in -mm
  2005-03-07  7:14               ` Daniel Barkalow
@ 2005-03-07  7:30                 ` Vojtech Pavlik
  0 siblings, 0 replies; 10+ messages in thread
From: Vojtech Pavlik @ 2005-03-07  7:30 UTC (permalink / raw)
  To: Daniel Barkalow
  Cc: Benoit Boissinot, Dmitry Torokhov, Linux Kernel Mailing List,
	Andrew Morton

On Mon, Mar 07, 2005 at 02:14:17AM -0500, Daniel Barkalow wrote:

> On Fri, 4 Mar 2005, Vojtech Pavlik wrote:
> 
> >  		/* Relative movement packet */
> >   		if (z == 127) {
> > -			input_report_rel(dev2, REL_X,  (x > 383 ? x : (x - 768)));
> > -			input_report_rel(dev2, REL_Y, -(y > 255 ? y : (x - 512)));
> > +			input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
> > +			input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));
> 
> Not that I have any idea, but (y - 512) seems much more likely here.
> 
> > +	if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
> > +		input_report_key(dev2, BTN_LEFT,   left);    
> > +		input_report_key(dev2, BTN_RIGHT,  right);
> > +		input_report_key(dev2, BTN_MIDDLE, middle);
> > +		input_report_rel(dev2, REL_X,  (x > 383 ? (x - 768) : x));
> > +		input_report_rel(dev2, REL_Y, -(y > 255 ? (x - 512) : y));
> 
> Also here.
 
Indeed. It took me a while to find it.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-03-07  7:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 23:29 ALPS tapping disabled. WHY? Ian E. Morgan
2005-02-25  3:08 ` Dmitry Torokhov
2005-02-27  7:50   ` Vojtech Pavlik
2005-02-28 22:23     ` Ian E. Morgan
2005-03-01 11:40       ` David Ford
2005-03-01 11:54         ` Vojtech Pavlik
2005-03-04 21:02           ` New ALPS code in -mm Benoit Boissinot
2005-03-04 21:13             ` Vojtech Pavlik
2005-03-07  7:14               ` Daniel Barkalow
2005-03-07  7:30                 ` Vojtech Pavlik

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).