Skip to contentSkip to conversation

Input: ALPS - Detect trackstick presence for v7 protocol

PATCH In review Pali Rohár 3 participants 15 messages Mar 22, 2015 – Jan 6, 2016 5 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: ALPS - Detect trackstick presence for v7 protocol

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

---
 drivers/input/mouse/alps.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/input/mouse/alps.c +8 -4
index 33198b9..c9cd27a 100644
@@ -30,6 +30,7 @@
 #define ALPS_CMD_NIBBLE_10	0x01f2
 
 #define ALPS_REG_BASE_RUSHMORE	0xc2c0
+#define ALPS_REG_BASE_V7	0xc2c0
 #define ALPS_REG_BASE_PINNACLE	0x0000
 
 static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
@@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
 	return 0;
 }
 
-static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
+static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
 {
 	int ret = -EIO, reg_val;
 
@@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
 	int reg_val;
 	unsigned char param[4];
 
-	reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
+	reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
 	if (reg_val == -EIO)
 		goto error;
 
@@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
 		priv->x_bits = 16;
 		priv->y_bits = 12;
 
-		if (alps_probe_trackstick_v3(psmouse,
-					     ALPS_REG_BASE_RUSHMORE) < 0)
+		if (alps_probe_trackstick_v3_v7(psmouse,
+						ALPS_REG_BASE_RUSHMORE) < 0)
 			priv->flags &= ~ALPS_DUALPOINT;
 
 		break;
@@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
 		if (priv->fw_ver[1] != 0xba)
 			priv->flags |= ALPS_BUTTONPAD;
 
+		if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
+			priv->flags &= ~ALPS_DUALPOINT;
+
 		break;
 	}
 
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

Hi,

Quoted 11 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Regards,

Hans

Quoted 47 lines
---
  drivers/input/mouse/alps.c |   12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)
drivers/input/mouse/alps.c +5 -4
index 33198b9..c9cd27a 100644
@@ -30,6 +30,7 @@
  #define ALPS_CMD_NIBBLE_10	0x01f2
 
  #define ALPS_REG_BASE_RUSHMORE	0xc2c0
+#define ALPS_REG_BASE_V7	0xc2c0
  #define ALPS_REG_BASE_PINNACLE	0x0000
 
  static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
@@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
  	return 0;
  }
 
-static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
+static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
  {
  	int ret = -EIO, reg_val;
 
@@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
  	int reg_val;
  	unsigned char param[4];
 
-	reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
+	reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
  	if (reg_val == -EIO)
  		goto error;
 
@@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
  		priv->x_bits = 16;
  		priv->y_bits = 12;
 
-		if (alps_probe_trackstick_v3(psmouse,
-					     ALPS_REG_BASE_RUSHMORE) < 0)
+		if (alps_probe_trackstick_v3_v7(psmouse,
+						ALPS_REG_BASE_RUSHMORE) < 0)
  			priv->flags &= ~ALPS_DUALPOINT;
 
  		break;

drivers/input/mouse/alps.c static int alps_set_protocol(struct psmouse *psmouse, · line 2320

Quoted 9 lines
drivers/input/mouse/alps.c +3 -0
@@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
  		if (priv->fw_ver[1] != 0xba)
  			priv->flags |= ALPS_BUTTONPAD;
 
+		if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
+			priv->flags &= ~ALPS_DUALPOINT;
+
  		break;
  	}
 

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 19 lines · On Monday 23 March 2015 12:39:48 Hans de Goede wrote:

Hi,

Quoted 8 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Quoted 7 lines

Also user in bug
https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Quoted 9 lines

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Regards,

Hans

I did not tested my patch on any v7 touchpad-only laptop.

But I guess Dell should have tested it... Of course we can wait until somebody test this patch and after that we will merge it.

@Santiago: Can you test this patch? You also have v7 touchpad only laptop (without trackstick).

Signature · 2 lines
Pali Rohár
[email protected]
#3 lore raw

Hi,

Quoted 25 lines · Pali Rohár
Quoted 24 lines · On Monday 23 March 2015 12:39:48 Hans de Goede wrote:

Hi,

Quoted 8 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Quoted 7 lines

Also user in bug
https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Quoted 6 lines
Quoted 4 lines

Regards,

Hans

I did not tested my patch on any v7 touchpad-only laptop.

Ah, but I'm not worried about testing on a touchpad-only laptop, we are already reporting a trackpoint there even though there is none. I'm worried about breaking existing v7 using laptops which actually have a trackstick.

So if this is tested on a v7 laptop with trackstick, and it does not break the trackstick then that is good enough for me.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com

#5 lore raw

Hello, I can compile psmouse.ko module for you. Just let me know which ubuntu kernel (and from) are you using.

Quoted 63 lines · On Tuesday 24 March 2015 11:25:13 Santiago Gala wrote:

I can't compile the kernel in this laptop, sorry, I tried but couln't complete: it requires too much free disk (more than 9GB) and the SSD is very small.

If there is a way (I have not found it even though I know that dkms exists) to just compile the modjule I could easily test the patch with the mainline ubuntu binary of the relevant 4.0.0-rcN, but spending some time trying it didn't show how to do i

Regards
Santiago

El mar., 24 de marzo de 2015 a las 8:30, Hans de Goede (<[email protected]>)

Quoted 46 lines · escribió:

Hi,

Quoted 25 lines · Pali Rohár
Quoted 24 lines · On Monday 23 March 2015 12:39:48 Hans de Goede wrote:

Hi,

Quoted 8 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Quoted 7 lines

Also user in bug
https://bugzilla.kernel.org/show_bug.cgi?id=94801
reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Quoted 5 lines
Quoted 3 lines

Regards,

Hans

I did not tested my patch on any v7 touchpad-only laptop.

Ah, but I'm not worried about testing on a touchpad-only laptop, we are already reporting a trackpoint there even though there is none. I'm worried about breaking existing v7 using laptops which actually have a trackstick.

So if this is tested on a v7 laptop with trackstick, and it does not break the trackstick then that is good enough for me.

Regards,

Hans

Signature · 2 lines
Pali Rohár
[email protected]
maintainer
#6 lore raw
In reply to a message not in the archive
Quoted 8 lines · Santiago Gala

I can't compile the kernel in this laptop, sorry, I tried but couln't
complete: it requires too much free disk (more than 9GB) and the SSD is very small.

If there is a way (I have not found it even though I know that dkms exists) to just compile the modjule I could easily test the patch with the mainline ubuntu binary of the relevant 4.0.0-rcN, but spending some time trying it didn't show how to do i

If you have another more powerful box you can always compile the kernel there and then use "sshfs -o allow_others local_dir remote_box:kernel/build/dir/" to mount the build directory on the target box and do "cd local_dir; sudo make modules_install install" to install the kernel.

Thanks.

Signature · 1 line
Dmitry
maintainer
#7 lore raw
In reply to Hans de Goede
Quoted 35 lines · Hans de Goede

Hi,

Quoted 25 lines · Pali Rohár
Quoted 24 lines · On Monday 23 March 2015 12:39:48 Hans de Goede wrote:

Hi,

Quoted 8 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Quoted 7 lines

Also user in bug
https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Quoted 6 lines
Quoted 4 lines

Regards,

Hans

I did not tested my patch on any v7 touchpad-only laptop.

Quoted 7 lines

Ah, but I'm not worried about testing on a touchpad-only laptop, we are already reporting a trackpoint there even though there is none. I'm worried about breaking existing v7 using laptops which actually have a trackstick.

So if this is tested on a v7 laptop with trackstick, and it does not break the trackstick then that is good enough for me.

I wonder if Masaki might have devices with V7 and trackstick available and could test the patch for us?

Thanks.

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
Quoted 41 lines · On Saturday 28 March 2015 20:59:35 Dmitry Torokhov wrote:
Quoted 40 lines · Hans de Goede

Hi,

Quoted 25 lines · Pali Rohár
Quoted 24 lines · On Monday 23 March 2015 12:39:48 Hans de Goede wrote:

Hi,

Quoted 8 lines · Pali Rohár

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models: Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Quoted 7 lines

Also user in bug
https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

Looks good, but has this been tested on a laptop which actually has a v7 pad + trackstick? I would like to see this actually tested on at least one such laptop before it gets merged.

Quoted 6 lines
Quoted 4 lines

Regards,

Hans

I did not tested my patch on any v7 touchpad-only laptop.

Ah, but I'm not worried about testing on a touchpad-only laptop, we are already reporting a trackpoint there even though there is none. I'm worried about breaking existing v7 using laptops which actually have a trackstick.

Quoted 8 lines
Quoted 2 lines

So if this is tested on a v7 laptop with trackstick, and it does not break the trackstick then that is good enough for me.

I wonder if Masaki might have devices with V7 and trackstick available and could test the patch for us?

Thanks.

Masaki ping, do you have any V7 device with trackstick for testing?

Signature · 6 lines
Pali Rohár
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 201503271816.11723@pali

A message that is not in the archive (sent off-list or not yet received): CAPXTYCX13Y7FY7o9CPPQXchSVYiJ415o_yxOFruO-scTV=X27w@mail.gmail.com

#11 lore raw

Hello,

there should no functional changes (e.g. acceleration speed, etc.). And if yes, there is probably some side effect which should be investigated.

Please can you provide output from dmesg (grep for psmouse or input) and also output from lsinput?

That changed acceleration/speed sounds like psmouse fallbacks to some ImPS/2 relative protocol and not ALPS...

Quoted 63 lines · On Friday 27 March 2015 20:46:59 Santiago Gala wrote:

It works quite well! :)

I got some issues: at first it didn't work after I mv'ed the original and put the unzipped new in its place. After reboot it failed exactly the same, but after I "sudo /etc/init.d/lightdm stop; sudo modprobe -r psmouse; sudo modprobe psmouse; sudo /etc/init.d/lightdm start" it worked. Then I remembered about the initrd.img which should contain it. So I did "sudo dpkg-reconfigure linux-image-4.0.0-040000rc5-generic", rebooted again and here I am.

Things seem to work all right. The only thing I notice is that the old driver moved fast in console mode (with gpm) while the new one is rather slow, would need to tweak the acceleration configuration. even after adding "responsiveness=15" to the configuration, as the sample /etc/gpm.conf says, it is slower than the previous kernel with the stock configuration.

Regards

Santiago

El vie., 27 de marzo de 2015 a las 18:17, Pali Rohár (<[email protected]>) escribió:

Quoted 9 lines · On Thursday 26 March 2015 16:33:13 you wrote:

El mar., 24 de marzo de 2015 a las 17:48, Pali Rohár (<[email protected]>)

Quoted 2 lines · escribió:

Hello, I can compile psmouse.ko module for you. Just let me know which ubuntu kernel (and from) are you using.

This one could do:

Quoted 8 lines

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc5-vivid
/

or at a choice any further one (they get published as they are released)

Regards
Santiago

Hello, in attachment is gzipped psmouse.ko module compiled against above ubuntu kernel from linus git tree (3c435c1e) with additional patches:

https://lkml.org/lkml/2015/3/21/282
https://lkml.org/lkml/2015/3/22/93
https://lkml.org/lkml/2015/3/22/94

Test it and if everything works as expected, please send email to all all people and ML. Thanks.

--
Pali Rohár
[email protected]

Signature · 2 lines
Pali Rohár
[email protected]

A message that is not in the archive (sent off-list or not yet received): CAPXTYCVGpm27naqu723f8kC0h75TT6XSN0X_EWCu6cXJS0G2kg@mail.gmail.com

#13 lore raw
Quoted 4 lines · On Friday 27 March 2015 21:32:12 Santiago Gala wrote:

I guess the difference is more due to new limits reported.

Now I get only one device:

Quoted 9 lines

/dev/input/event11
bustype : BUS_I8042
vendor : 0x2
product : 0x8
version : 1792
name : "AlpsPS/2 ALPS GlidePoint"
phys : "isa0060/serio1/input0"
bits ev : EV_SYN EV_KEY EV_ABS

Ok, it means that trackstick detection patch detected that you do not have trackstick (and you have only touchpad device).

And also that psmouse.ko is really using ALPS driver.

Quoted 27 lines

And it produces different output in evemu-describe. I attach alps11-new.txt (the new one). See fragment of difference with relevant previous one:

(quoted diff) +4 -4
@@ -38,17 +38,17 @@
 #     Event code 53 (ABS_MT_POSITION_X)
 #       Value      0
 #       Min        0
-#       Max      448
+#       Max     4095
 #       Fuzz       0
 #       Flat       0
-#       Resolution 4
+#       Resolution 42
 #     Event code 54 (ABS_MT_POSITION_Y)
 #       Value      0
 #       Min        0
-#       Max        0
+#       Max     2047
 #       Fuzz       0
 #       Flat       0
-#       Resolution 0
+#       Resolution 38
 #     Event code 57 (ABS_MT_TRACKING_ID)
 #       Value      0
 #       Min        0
Quoted 3 lines

So resolutions are reported clearly different than with the broken patch.

Can you look at difference between old 3.19 kernel version and this new one? To check if there is no regression.

Quoted 88 lines

Regards
Santiago

El vie., 27 de marzo de 2015 a las 21:09, Pali Rohár (<[email protected]>)

Quoted 81 lines · escribió:

Hello,

there should no functional changes (e.g. acceleration speed, etc.). And if yes, there is probably some side effect which should be investigated.

Please can you provide output from dmesg (grep for psmouse or input) and also output from lsinput?

That changed acceleration/speed sounds like psmouse fallbacks to some ImPS/2 relative protocol and not ALPS...

Quoted 58 lines · On Friday 27 March 2015 20:46:59 Santiago Gala wrote:

It works quite well! :)

I got some issues: at first it didn't work after I mv'ed the original and put the unzipped new in its place. After reboot it failed exactly the same, but after I "sudo /etc/init.d/lightdm stop; sudo modprobe -r psmouse; sudo modprobe psmouse; sudo /etc/init.d/lightdm start" it worked. Then I remembered about the initrd.img which should contain it. So I did "sudo dpkg-reconfigure linux-image-4.0.0-040000rc5-generic", rebooted again and here I am.

Things seem to work all right. The only thing I notice is that the old driver moved fast in console mode (with gpm) while the new one is rather slow, would need to tweak the acceleration configuration. even after adding "responsiveness=15" to the configuration, as the sample /etc/gpm.conf says, it is slower than the previous kernel with the stock configuration.

Regards

Santiago

El vie., 27 de marzo de 2015 a las 18:17, Pali Rohár (<[email protected]>) escribió:

Quoted 10 lines · On Thursday 26 March 2015 16:33:13 you wrote:

El mar., 24 de marzo de 2015 a las 17:48, Pali Rohár (<[email protected]>)

Quoted 3 lines · escribió:

Hello, I can compile psmouse.ko module for you. Just let me know which ubuntu kernel (and from) are you using.

This one could do:

Quoted 8 lines

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc5-v
ivid /

or at a choice any further one (they get published as they are released)

Regards
Santiago

Hello, in attachment is gzipped psmouse.ko module compiled against above ubuntu kernel from linus git tree (3c435c1e) with additional patches:

https://lkml.org/lkml/2015/3/21/282
https://lkml.org/lkml/2015/3/22/93
https://lkml.org/lkml/2015/3/22/94

Quoted 6 lines

Test it and if everything works as expected, please send email to all all people and ML. Thanks.

--
Pali Rohár
[email protected]

--
Pali Rohár
[email protected]

Signature · 2 lines
Pali Rohár
[email protected]

A message that is not in the archive (sent off-list or not yet received): CAPXTYCUqibXqTBf8VKGKixKeM49LhucxFDhS+04fUsiSEKMKOg@mail.gmail.com

maintainer
#15 lore raw
Quoted 32 lines · Santiago Gala

The behaviour is the same with 3.19.1 as with 4.0.0-rc5 + the patched psmouse you give me. The difference in lsinput is just name and current position:

$ diff -u alps06.txt alps11-new.txt
alps11-new.txt 2015-03-27 21:24:44.285503438 +0100 renamed from alps06.txt 2015-03-18 07:21:08.827315595 +0100 +3 -3
@@ -1,5 +1,5 @@
 # EVEMU 1.2
-# Input device name: "AlpsPS/2 ALPS DualPoint TouchPad"
+# Input device name: "AlpsPS/2 ALPS GlidePoint"
 # Input device ID: bus 0x11 vendor 0x02 product 0x08 version 0x700
 # Supported events:
 #   Event type 0 (EV_SYN)
@@ -15,14 +15,14 @@
 #     Event code 335 (BTN_TOOL_QUADTAP)
 #   Event type 3 (EV_ABS)
 #     Event code 0 (ABS_X)
-#       Value   1076
+#       Value   1549
 #       Min        0
 #       Max     4095
 #       Fuzz       0
 #       Flat       0
 #       Resolution 42
 #     Event code 1 (ABS_Y)
-#       Value    869
+#       Value    877
 #       Min        0
 #       Max     2047
 #       Fuzz       0

alps11-new.txt 2015-03-27 21:24:44.285503438 +0100 line 65

Quoted 8 lines
alps11-new.txt 2015-03-27 21:24:44.285503438 +0100 renamed from alps06.txt 2015-03-18 07:21:08.827315595 +0100 +1 -1
@@ -59,7 +59,7 @@
 # Properties:
 #   Property  type 0 (INPUT_PROP_POINTER)
 #   Property  type 2 (INPUT_PROP_BUTTONPAD)
-N: AlpsPS/2 ALPS DualPoint TouchPad
+N: AlpsPS/2 ALPS GlidePoint
 I: 0011 0002 0008 0700
 P: 05 00 00 00 00 00 00 00
 B: 00 0b 00 00 00 00 00 00 00

Hmm, if resolution is the same I wonder if we are dropping some packets... Is there any messages from psmouse module in dmesg?

Thanks.

Quoted 152 lines
Quoted 147 lines · Pali Rohár
Quoted 4 lines · On Friday 27 March 2015 21:32:12 Santiago Gala wrote:

I guess the difference is more due to new limits reported.

Now I get only one device:

Quoted 9 lines

/dev/input/event11
bustype : BUS_I8042
vendor : 0x2
product : 0x8
version : 1792
name : "AlpsPS/2 ALPS GlidePoint"
phys : "isa0060/serio1/input0"
bits ev : EV_SYN EV_KEY EV_ABS

Ok, it means that trackstick detection patch detected that you do not have trackstick (and you have only touchpad device).

And also that psmouse.ko is really using ALPS driver.

Quoted 27 lines

And it produces different output in evemu-describe. I attach alps11-new.txt (the new one). See fragment of difference with relevant previous one:

(quoted diff) +4 -4
@@ -38,17 +38,17 @@
 #     Event code 53 (ABS_MT_POSITION_X)
 #       Value      0
 #       Min        0
-#       Max      448
+#       Max     4095
 #       Fuzz       0
 #       Flat       0
-#       Resolution 4
+#       Resolution 42
 #     Event code 54 (ABS_MT_POSITION_Y)
 #       Value      0
 #       Min        0
-#       Max        0
+#       Max     2047
 #       Fuzz       0
 #       Flat       0
-#       Resolution 0
+#       Resolution 38
 #     Event code 57 (ABS_MT_TRACKING_ID)
 #       Value      0
 #       Min        0
Quoted 3 lines

So resolutions are reported clearly different than with the broken patch.

Can you look at difference between old 3.19 kernel version and this new one? To check if there is no regression.

Quoted 88 lines

Regards
Santiago

El vie., 27 de marzo de 2015 a las 21:09, Pali Rohár (<[email protected]>)

Quoted 81 lines · escribió:

Hello,

there should no functional changes (e.g. acceleration speed, etc.). And if yes, there is probably some side effect which should be investigated.

Please can you provide output from dmesg (grep for psmouse or input) and also output from lsinput?

That changed acceleration/speed sounds like psmouse fallbacks to some ImPS/2 relative protocol and not ALPS...

Quoted 58 lines · On Friday 27 March 2015 20:46:59 Santiago Gala wrote:

It works quite well! :)

I got some issues: at first it didn't work after I mv'ed the original and put the unzipped new in its place. After reboot it failed exactly the same, but after I "sudo /etc/init.d/lightdm stop; sudo modprobe -r psmouse; sudo modprobe psmouse; sudo /etc/init.d/lightdm start" it worked. Then I remembered about the initrd.img which should contain it. So I did "sudo dpkg-reconfigure linux-image-4.0.0-040000rc5-generic", rebooted again and here I am.

Things seem to work all right. The only thing I notice is that the old driver moved fast in console mode (with gpm) while the new one is rather slow, would need to tweak the acceleration configuration. even after adding "responsiveness=15" to the configuration, as the sample /etc/gpm.conf says, it is slower than the previous kernel with the stock configuration.

Regards

Santiago

El vie., 27 de marzo de 2015 a las 18:17, Pali Rohár (<[email protected]>) escribió:

Quoted 10 lines · On Thursday 26 March 2015 16:33:13 you wrote:

El mar., 24 de marzo de 2015 a las 17:48, Pali Rohár (<[email protected]>)

Quoted 3 lines · escribió:

Hello, I can compile psmouse.ko module for you. Just let me know which ubuntu kernel (and from) are you using.

This one could do:

Quoted 8 lines

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc5-v
ivid /

or at a choice any further one (they get published as they are released)

Regards
Santiago

Hello, in attachment is gzipped psmouse.ko module compiled against above ubuntu kernel from linus git tree (3c435c1e) with additional patches:

https://lkml.org/lkml/2015/3/21/282
https://lkml.org/lkml/2015/3/22/93
https://lkml.org/lkml/2015/3/22/94

Quoted 6 lines

Test it and if everything works as expected, please send email to all all people and ML. Thanks.

--
Pali Rohár
[email protected]

--
Pali Rohár
[email protected]

--
Pali Rohár
[email protected]

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#16 lore raw
Quoted 59 lines · On Saturday 28 March 2015 04:43:35 Dmitry Torokhov wrote:
Quoted 50 lines · Santiago Gala

The behaviour is the same with 3.19.1 as with 4.0.0-rc5 + the patched psmouse you give me. The difference in lsinput is just name and current position:

$ diff -u alps06.txt alps11-new.txt
alps11-new.txt 2015-03-27 21:24:44.285503438 +0100 renamed from alps06.txt 2015-03-18 07:21:08.827315595 +0100 +1 -1
@@ -1,5 +1,5 @@
 
 # EVEMU 1.2
 
-# Input device name: "AlpsPS/2 ALPS DualPoint TouchPad"
+# Input device name: "AlpsPS/2 ALPS GlidePoint"
 

# Input device ID: bus 0x11 vendor 0x02 product 0x08 version 0x700 # Supported events:
# Event type 0 (EV_SYN)

alps11-new.txt 2015-03-27 21:24:44.285503438 +0100 renamed from alps06.txt 2015-03-18 07:21:08.827315595 +0100 +3 -3
@@ -15,14 +15,14 @@
 
 #     Event code 335 (BTN_TOOL_QUADTAP)
 #   Event type 3 (EV_ABS)
 #     Event code 0 (ABS_X)
 
-#       Value   1076
+#       Value   1549
 
 #       Min        0
 #       Max     4095
 #       Fuzz       0
 #       Flat       0
 #       Resolution 42
 #     Event code 1 (ABS_Y)
 
-#       Value    869
+#       Value    877
 
 #       Min        0
 #       Max     2047
 #       Fuzz       0
@@ -59,7 +59,7 @@
 
 # Properties:
 #   Property  type 0 (INPUT_PROP_POINTER)
 #   Property  type 2 (INPUT_PROP_BUTTONPAD)
 
-N: AlpsPS/2 ALPS DualPoint TouchPad
+N: AlpsPS/2 ALPS GlidePoint
 
Quoted 3 lines

I: 0011 0002 0008 0700
P: 05 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00

Hmm, if resolution is the same I wonder if we are dropping some packets... Is there any messages from psmouse module in dmesg?

Quoted 2 lines

Thanks.

For me output/diff looks ok. Name is based on DUALPOINT flag which is cleared for non trackstick device version. And my patch adding that trackstick detection for v7.

Signature · 2 lines
Pali Rohár
[email protected]
author Tested-by Alex Hung on v1 1/1
#17 lore raw
In reply to Pali Rohár
Quoted 4 lines · On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Quoted 8 lines

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

---

Hello!

Alex now tested this patch on two Dell machines with ALPS: E5450 (with TrackStick) and E5250 (without TrackStick).

With patch nothing was changed for E5450. And E5250 with patch does not show trackstick input device anymore.

Quoted 54 lines
 drivers/input/mouse/alps.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/input/mouse/alps.c +8 -4
index 33198b9..c9cd27a 100644
@@ -30,6 +30,7 @@
 #define ALPS_CMD_NIBBLE_10	0x01f2
 
 #define ALPS_REG_BASE_RUSHMORE	0xc2c0
+#define ALPS_REG_BASE_V7	0xc2c0
 #define ALPS_REG_BASE_PINNACLE	0x0000
 
 static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
@@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
 	return 0;
 }
 
-static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
+static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
 {
 	int ret = -EIO, reg_val;
 
@@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
 	int reg_val;
 	unsigned char param[4];
 
-	reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
+	reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
 	if (reg_val == -EIO)
 		goto error;
 
@@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
 		priv->x_bits = 16;
 		priv->y_bits = 12;
 
-		if (alps_probe_trackstick_v3(psmouse,
-					     ALPS_REG_BASE_RUSHMORE) < 0)
+		if (alps_probe_trackstick_v3_v7(psmouse,
+						ALPS_REG_BASE_RUSHMORE) < 0)
 			priv->flags &= ~ALPS_DUALPOINT;
 
 		break;
@@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
 		if (priv->fw_ver[1] != 0xba)
 			priv->flags |= ALPS_BUTTONPAD;
 
+		if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
+			priv->flags &= ~ALPS_DUALPOINT;
+
 		break;
 	}
 
Signature · 6 lines
Pali Rohár
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reviewed-by
#18 lore raw

Hi,

Quoted 16 lines · Pali Rohár
Quoted 4 lines · On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Quoted 8 lines

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

---

Hello!

Quoted 7 lines

Alex now tested this patch on two Dell machines with ALPS: E5450 (with TrackStick) and E5250 (without TrackStick).

With patch nothing was changed for E5450. And E5250 with patch does not show trackstick input device anymore.

With that this patch looks good to me:

Pali, it is probably a good idea to send Dmitry a v2 of these 2 patches rebased on top of the latest next and with Alex' Tested-By and my Reviewed-by-s added.

Regards,

Hans

Quoted 56 lines
Quoted 55 lines
  drivers/input/mouse/alps.c |   12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)
drivers/input/mouse/alps.c +8 -4
index 33198b9..c9cd27a 100644
@@ -30,6 +30,7 @@
  #define ALPS_CMD_NIBBLE_10	0x01f2
 
  #define ALPS_REG_BASE_RUSHMORE	0xc2c0
+#define ALPS_REG_BASE_V7	0xc2c0
  #define ALPS_REG_BASE_PINNACLE	0x0000
 
  static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
@@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
  	return 0;
  }
 
-static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
+static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
  {
  	int ret = -EIO, reg_val;
 
@@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
  	int reg_val;
  	unsigned char param[4];
 
-	reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
+	reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
  	if (reg_val == -EIO)
  		goto error;
 
@@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
  		priv->x_bits = 16;
  		priv->y_bits = 12;
 
-		if (alps_probe_trackstick_v3(psmouse,
-					     ALPS_REG_BASE_RUSHMORE) < 0)
+		if (alps_probe_trackstick_v3_v7(psmouse,
+						ALPS_REG_BASE_RUSHMORE) < 0)
  			priv->flags &= ~ALPS_DUALPOINT;
 
  		break;
@@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
  		if (priv->fw_ver[1] != 0xba)
  			priv->flags |= ALPS_BUTTONPAD;
 
+		if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
+			priv->flags &= ~ALPS_DUALPOINT;
+
  		break;
  	}
 
maintainer
#19 lore raw
Quoted 27 lines · Hans de Goede

Hi,

Quoted 16 lines · Pali Rohár
Quoted 4 lines · On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:

This patch adds detection of trackstick for v7 protocol devices. Code in this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Quoted 8 lines

Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without trackstick and kernel reports to userspace also redundant trackstick device.

---

Hello!

Quoted 7 lines

Alex now tested this patch on two Dell machines with ALPS: E5450 (with TrackStick) and E5250 (without TrackStick).

With patch nothing was changed for E5450. And E5250 with patch does not show trackstick input device anymore.

Quoted 7 lines

With that this patch looks good to me:

Pali, it is probably a good idea to send Dmitry a v2 of these 2 patches rebased on top of the latest next and with Alex' Tested-By and my Reviewed-by-s added.

It's alright, I added the tags and applied.

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html