diff mbox

Dell Latitude E7470 touchpad status

Message ID 877feijp2b.fsf@smart-cactus.org (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Gamari May 25, 2016, 12:32 p.m. UTC
Pali Rohár <pali.rohar@gmail.com> writes:

> Hi Allen, thank you for confirmation.
>
> Ben, V8 protocol is supported by linux kernel since version 4.1. Do you
> have needed version? If yes and your touchpad does not work, please
> compile psmouse.ko in debug mode and send us dmesg output. Maybe there
> can be something interesting...
>
The first attached patch gets me partly there; I see multitouch events,
the pressure appears to reflect reality, and things generally work as
expected. That is, until I try to touch the touchstick, which causes the
pointer to jump around wildly.

The second attached patch makes things behave slightly better, but the
touchstick still does not work as expected. Settting
ALPS_PS2_INTERLEAVED as well doesn't appear to change anything.

Ideas?

Cheers,

- Ben



From 73f99f86c77d39ff512f2064ca9f2002c6404dd9 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Wed, 25 May 2016 14:19:53 +0200
Subject: [PATCH 1/2] alps: Add touchpad for Dell Latitude E7470

However, this still isn't quite right as the touchstick appears to
corrupt the event stream.
---
 drivers/input/mouse/alps.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Pali Rohár May 25, 2016, 3:43 p.m. UTC | #1
On Wednesday 25 May 2016 14:32:28 Ben Gamari wrote:
> Pali Rohár <pali.rohar@gmail.com> writes:
> 
> > Hi Allen, thank you for confirmation.
> >
> > Ben, V8 protocol is supported by linux kernel since version 4.1. Do you
> > have needed version? If yes and your touchpad does not work, please
> > compile psmouse.ko in debug mode and send us dmesg output. Maybe there
> > can be something interesting...
> >
> The first attached patch gets me partly there; I see multitouch events,
> the pressure appears to reflect reality, and things generally work as
> expected. That is, until I try to touch the touchstick, which causes the
> pointer to jump around wildly.

So with first patch touchpad starts working fine and just trackstick
cause problems?

Reason for non working trackstick is simple. Driver alps.c does not
support trackstick in V8 protocol. So you even does not see second
(trackstick) input device, right?

> The second attached patch makes things behave slightly better,

Looking at the alps.c code it should act exactly same. V8 does not
support trackpoint, so ALPS_DUALPOINT has no effect. There should not be
any difference between your first and second patch. Can you play more
and confirm it?

> but the touchstick still does not work as expected. Settting
> ALPS_PS2_INTERLEAVED as well doesn't appear to change anything.

ALPS_PS2_INTERLEAVED is just for V2 protocol. It does not have any
effect for other protocols.

> Ideas?

I think now we just need description of trackstick format for V8
protocol. And then implement it in alps V8 parser.

Anyway, now I'm looking at Documentation/input/alps.txt file and there
is no info about V8 protocol :-(

Hans, do you have "compact" description of V8 protocol? So it can be
added into that alps.txt file. Also do you have description of that
missing trackstick V8 format?

> Cheers,
> 
> - Ben
> 
> 
> 
> From 73f99f86c77d39ff512f2064ca9f2002c6404dd9 Mon Sep 17 00:00:00 2001
> From: Ben Gamari <ben@smart-cactus.org>
> Date: Wed, 25 May 2016 14:19:53 +0200
> Subject: [PATCH 1/2] alps: Add touchpad for Dell Latitude E7470
> 
> However, this still isn't quite right as the touchstick appears to
> corrupt the event stream.
> ---
>  drivers/input/mouse/alps.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 936f07a..a0c5dfe 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -2767,6 +2767,9 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
>  		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
>  			   e7[2] == 0x14 && ec[1] == 0x02) {
>  			protocol = &alps_v8_protocol_data;
> +		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
> +               e7[2] == 0x28 && ec[1] == 0x01) {
> +      protocol = &alps_v8_protocol_data;
>  		} else {
>  			psmouse_dbg(psmouse,
>  				    "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);
Hans de Goede May 25, 2016, 3:47 p.m. UTC | #2
Hi,

On 25-05-16 17:43, Pali Rohár wrote:
> On Wednesday 25 May 2016 14:32:28 Ben Gamari wrote:
>> Pali Rohár <pali.rohar@gmail.com> writes:
>>
>>> Hi Allen, thank you for confirmation.
>>>
>>> Ben, V8 protocol is supported by linux kernel since version 4.1. Do you
>>> have needed version? If yes and your touchpad does not work, please
>>> compile psmouse.ko in debug mode and send us dmesg output. Maybe there
>>> can be something interesting...
>>>
>> The first attached patch gets me partly there; I see multitouch events,
>> the pressure appears to reflect reality, and things generally work as
>> expected. That is, until I try to touch the touchstick, which causes the
>> pointer to jump around wildly.
>
> So with first patch touchpad starts working fine and just trackstick
> cause problems?
>
> Reason for non working trackstick is simple. Driver alps.c does not
> support trackstick in V8 protocol. So you even does not see second
> (trackstick) input device, right?
>
>> The second attached patch makes things behave slightly better,
>
> Looking at the alps.c code it should act exactly same. V8 does not
> support trackpoint, so ALPS_DUALPOINT has no effect. There should not be
> any difference between your first and second patch. Can you play more
> and confirm it?
>
>> but the touchstick still does not work as expected. Settting
>> ALPS_PS2_INTERLEAVED as well doesn't appear to change anything.
>
> ALPS_PS2_INTERLEAVED is just for V2 protocol. It does not have any
> effect for other protocols.
>
>> Ideas?
>
> I think now we just need description of trackstick format for V8
> protocol. And then implement it in alps V8 parser.
>
> Anyway, now I'm looking at Documentation/input/alps.txt file and there
> is no info about V8 protocol :-(
>
> Hans, do you have "compact" description of V8 protocol? So it can be
> added into that alps.txt file. Also do you have description of that
> missing trackstick V8 format?

No, sorry the V8 code was submitted by alps themselves, so 'm not familiar
with it.

Regards,

Hans



>
>> Cheers,
>>
>> - Ben
>>
>>
>>
>> From 73f99f86c77d39ff512f2064ca9f2002c6404dd9 Mon Sep 17 00:00:00 2001
>> From: Ben Gamari <ben@smart-cactus.org>
>> Date: Wed, 25 May 2016 14:19:53 +0200
>> Subject: [PATCH 1/2] alps: Add touchpad for Dell Latitude E7470
>>
>> However, this still isn't quite right as the touchstick appears to
>> corrupt the event stream.
>> ---
>>  drivers/input/mouse/alps.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>> index 936f07a..a0c5dfe 100644
>> --- a/drivers/input/mouse/alps.c
>> +++ b/drivers/input/mouse/alps.c
>> @@ -2767,6 +2767,9 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
>>  		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
>>  			   e7[2] == 0x14 && ec[1] == 0x02) {
>>  			protocol = &alps_v8_protocol_data;
>> +		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
>> +               e7[2] == 0x28 && ec[1] == 0x01) {
>> +      protocol = &alps_v8_protocol_data;
>>  		} else {
>>  			psmouse_dbg(psmouse,
>>  				    "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ben Gamari May 25, 2016, 3:53 p.m. UTC | #3
Pali Rohár <pali.rohar@gmail.com> writes:

> On Wednesday 25 May 2016 14:32:28 Ben Gamari wrote:
>> 
>> The first attached patch gets me partly there; I see multitouch events,
>> the pressure appears to reflect reality, and things generally work as
>> expected. That is, until I try to touch the touchstick, which causes the
>> pointer to jump around wildly.
>
> So with first patch touchpad starts working fine and just trackstick
> cause problems?
>
> Reason for non working trackstick is simple. Driver alps.c does not
> support trackstick in V8 protocol. So you even does not see second
> (trackstick) input device, right?
>
Correct.

>> The second attached patch makes things behave slightly better,
>
> Looking at the alps.c code it should act exactly same. V8 does not
> support trackpoint, so ALPS_DUALPOINT has no effect. There should not be
> any difference between your first and second patch. Can you play more
> and confirm it?
>
Ahh, so you are right. I apparently misread the code.

>> but the touchstick still does not work as expected. Settting
>> ALPS_PS2_INTERLEAVED as well doesn't appear to change anything.
>
> ALPS_PS2_INTERLEAVED is just for V2 protocol. It does not have any
> effect for other protocols.
>
Good to know. It would be nice if there were a comment indicating this
in alps.c.

>> Ideas?
>
> I think now we just need description of trackstick format for V8
> protocol. And then implement it in alps V8 parser.
>
Lovely. I'd be happy to carry out the implementation if protocol
documentation is available.

Cheers,

- Ben
Pali Rohár May 25, 2016, 4:01 p.m. UTC | #4
On Wednesday 25 May 2016 17:53:22 Ben Gamari wrote:
> Pali Rohár <pali.rohar@gmail.com> writes:
> > I think now we just need description of trackstick format for V8
> > protocol. And then implement it in alps V8 parser.
> 
> Lovely. I'd be happy to carry out the implementation if protocol
> documentation is available.

Masaki Ota: Do you have packet format for ALPS V8 (SS4) trackstick 
devices? If yes, can you share it with us?
Ben Gamari May 26, 2016, 8:55 a.m. UTC | #5
Hello everyone,

Here is a small patchset adding support for the Alps dualpoint device shipped
with the Dell Latitude 7470. Most of the driver support was already present as
this device speaks a variant of the SS4 V2 protocol (in particular, the variant
spoken by buttonpad devices, despite not being a buttonpad itself).

The majority of the delta here is adding missing touchstick support for the SS4
protocol.

Thanks to Masaki Ota for his help in getting this device working.

Cheers,

- Ben
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 936f07a..a0c5dfe 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -2767,6 +2767,9 @@  static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
 		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
 			   e7[2] == 0x14 && ec[1] == 0x02) {
 			protocol = &alps_v8_protocol_data;
+		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
+               e7[2] == 0x28 && ec[1] == 0x01) {
+      protocol = &alps_v8_protocol_data;
 		} else {
 			psmouse_dbg(psmouse,
 				    "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);
-- 
2.8.1



From ea668a46bfbc4165841368a75b197febb09c5b33 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Wed, 25 May 2016 14:22:05 +0200
Subject: [PATCH 2/2] Try setting ALPS_DUALPOINT

---
 drivers/input/mouse/alps.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index a0c5dfe..a034933 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -138,6 +138,7 @@  static const struct alps_model_info alps_model_data[] = {
 	{ { 0x52, 0x01, 0x14 }, 0x00, { ALPS_PROTO_V2, 0xff, 0xff,
 		ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED } },				/* Toshiba Tecra A11-11L */
 	{ { 0x73, 0x02, 0x64 }, 0x8a, { ALPS_PROTO_V4, 0x8f, 0x8f, 0 } },
+	{ { 0x73, 0x03, 0x28 }, 0x00, { ALPS_PROTO_V8, 0x18, 0x18, ALPS_DUALPOINT } }, /* Dell Latitude E7470 */
 };
 
 static const struct alps_protocol_info alps_v3_protocol_data = {
@@ -2767,9 +2768,6 @@  static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
 		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
 			   e7[2] == 0x14 && ec[1] == 0x02) {
 			protocol = &alps_v8_protocol_data;
-		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
-               e7[2] == 0x28 && ec[1] == 0x01) {
-      protocol = &alps_v8_protocol_data;
 		} else {
 			psmouse_dbg(psmouse,
 				    "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);