Skip to contentSkip to conversation

staging: nvec: ps2: fix touchpad operation

PATCH In review Paul Fertser 2 participants 4 messages Oct 27, 2016 1 message not in the archive

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

v2 cover staging: nvec: ps2: fix touchpad operation

Status quo on Toshiba ac100 (paz00) is that the integrated elantech touchpad is detected as an ImPS/2 mouse and so it's kind of functional but advanced synaptics configuration isn't available.

When only serio type is changed it leads to atkbd misdetecting the touchpad as a keyboard. So first goes the commit that fixes this bug, then the serio type change.

Paul Fertser (2):
drivers: staging: nvec: remove bogus reset command for PS/2 interface Revert "staging: nvec: ps2: change serio type to passthrough"

 drivers/staging/nvec/nvec_ps2.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 1/2 drivers: staging: nvec: remove bogus reset command for PS/2 interface

This command was sent behind serio's back and the answer to it was confusing atkbd probe function which lead to the elantech touchpad getting detected as a keyboard.

To prevent this from happening just let every party do its part of the job.

---
 drivers/staging/nvec/nvec_ps2.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/nvec/nvec_ps2.c +0 -4
index a324322..d63c4ef 100644
@@ -106,7 +106,6 @@ static int nvec_mouse_probe(struct platform_device *pdev)
 {
 	struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
 	struct serio *ser_dev;
-	char mouse_reset[] = { NVEC_PS2, SEND_COMMAND, PSMOUSE_RST, 3 };
 
 	ser_dev = devm_kzalloc(&pdev->dev, sizeof(struct serio), GFP_KERNEL);
 	if (!ser_dev)
@@ -127,9 +126,6 @@ static int nvec_mouse_probe(struct platform_device *pdev)
 
 	serio_register_port(ser_dev);
 
-	/* mouse reset */
-	nvec_write_async(nvec, mouse_reset, sizeof(mouse_reset));
-
 	return 0;
 }
 
Signature · 1 line
2.7.0
#2 lore raw

PATCH v2 2/2 Revert "staging: nvec: ps2: change serio type to passthrough"

In reply to Paul Fertser

This reverts commit 36b30d6138f4677514aca35ab76c20c1604baaad.

This is necessary to detect paz00 (ac100) touchpad properly as one speaking ETPS/2 protocol. Without it X.org's synaptics driver doesn't work as the touchpad is detected as an ImPS/2 mouse instead.

Commit ec6184b1c717b8768122e25fe6d312f609cc1bb4 changed the way auto-detection is performed on ports marked as pass through and made the issue apparent.

A pass through port is an additional PS/2 port used to connect a slave device to a master device that is using PS/2 to communicate with the host (so slave's PS/2 communication is tunneled over master's PS/2 link). "Synaptics PS/2 TouchPad Interfacing Guide" describes such a setup (PS/2 PASS-THROUGH OPTION section).

Since paz00's embedded controller is not connected to a PS/2 port itself, the PS/2 interface it exposes is not a pass-through one.

---
 drivers/staging/nvec/nvec_ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/nvec/nvec_ps2.c +1 -1
index d63c4ef..910e87b 100644
@@ -111,7 +111,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
 	if (!ser_dev)
 		return -ENOMEM;
 
-	ser_dev->id.type = SERIO_PS_PSTHRU;
+	ser_dev->id.type = SERIO_8042;
 	ser_dev->write = ps2_sendcommand;
 	ser_dev->start = ps2_startstreaming;
 	ser_dev->stop = ps2_stopstreaming;
Signature · 1 line
2.7.0
Acked-by
#4 lore raw
In reply to a message not in the archive

Am Donnerstag, 27. Oktober 2016, 17:22:07 CEST schrieb Paul Fertser:

Quoted 8 lines

Status quo on Toshiba ac100 (paz00) is that the integrated elantech touchpad is detected as an ImPS/2 mouse and so it's kind of functional but advanced synaptics configuration isn't available.

When only serio type is changed it leads to atkbd misdetecting the touchpad as a keyboard. So first goes the commit that fixes this bug, then the serio type change.

Quoted 6 lines

Paul Fertser (2):
drivers: staging: nvec: remove bogus reset command for PS/2 interface Revert "staging: nvec: ps2: change serio type to passthrough"

 drivers/staging/nvec/nvec_ps2.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Works fine now. Thanks!

The series is