Skip to contentSkip to conversation

Dell Latitude E7470 touchpad status

PATCH New Ben Gamari 4 participants 25 messages May 3, 2016 – May 26, 2016 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Ben Gamari

author
#0 lore raw

Hello Dell kernel people,

I recently started using a Latitude E7470 (with BIOS version 1.4.2) as my primary machine and have found that the touchpad seems to come up as a standard emulated PS/2 device.

input: ImPS/2 BYD TouchPad as /devices/platform/i8042/serio1/input/input6

Sadly simply blacklisting psmouse doesn't resolve this. I found this rather surprising for this to be the case with such modern hardware and have grown used to having a functional touchpad so I started to do some digging.

I started by dumping the machine's DSDT [1] to find that the touchpad's I2C interface appears to be conditional [2] on some embedded controller state exposed to the system via the SDS0 field of the GNVS OpRegion (which appears to be 0 on my system).

I have verified the values of OSYS (which is 0x07df on my machine) and SDM0 (which is 0x1), so SDS0 seems as though the only remaining barrier to having the i2c-hid touchpad properly exposed in the ACPI tables is SDS0.

So, does anyone know what might influence the value of SDS0 provided by the EC? Any help would be greatly appreciated.

Cheers,

- Ben

[1] https://github.com/bgamari/dell-e7470-dsdt

[2] _INI method for the TPD0:

    Method (_INI, 0, NotSerialized)  // _INI: Initialize
    {
        // Verify that we have at least Windows 2012
        If ((OSYS < 0x07DC))    // OSYS == 0x07df on my machine
        {
            SRXO (GPDI, One)
        }

        // GPIO number and interrupt number of GPDI pin?
        INT1 = GNUM (GPDI)
        INT2 = INUM (GPDI)

        If ((SDM0 == Zero))     // SDM0 == 1 on my machine
        {
            SHPO (GPDI, One)
        }

        If ((SDS0 == One))      // SDS0 == 0 on my machine
        {
            _HID = "SYNA2393"   // I guess this is some Synaptics touchpad?
            HID2 = 0x20
            Return (Zero)
        }

        If ((SDS0 == 0x02))
        {
            _HID = "06CB2846"   // Some other vendor's touchpad?
            HID2 = 0x20
            Return (Zero)
        }

        If ((SDS0 == 0x05))
        {
            _HID = "CUST0001"   // ???
            HID2 = TPDH /* \TPDH */
            BADR = TPDB /* \TPDB */
            If ((TPDS == Zero))
            {
                SPED = 0x000186A0
            }

            If ((TPDS == One))
            {
                SPED = 0x00061A80
            }

            If ((TPDS == 0x02))
            {
                SPED = 0x000F4240
            }

            Return (Zero)
        }
        // DSDT bug: Seems like this really ought to return a value since
        // otherwise the specification defines the behavior is undefined
    }

A message that is not in the archive (sent off-list or not yet received): 23E0F704395E694FA4710C833FA087E50D40B8BF13@TPEX7ADC101.APAC.DELL.COM

author
#2 lore raw
Quoted 8 lines · [email protected] writes:

Dell - Internal Use - Confidential
Hi Ben,

We have just confirmed the touchpad on Latitude E7470 is a PS/2 device, not an I2C-HID input device. The code you listed is common among many Dell products and the value of SDS0 should be provided somewhere (I can't find it out) to specify a PS/2 device.

Thanks Allen,

I rather suspected this; I suppose it's probably hard to find I2C-HID hardware that integrates a touchstick. This explains why SDS0 is 0 on my hardware.

In this case I suppose this is yet another Alps device? I've tried bringing it up with all of the recent Alps protocols supported by the alps.ko driver but sadly nothing seems to emit multitouch events, so it seems likely that there is yet another protocol variant waiting to be implemented. Is there any chance you could see whether Alps might now be more willing to provide protocol documentation? If not, perhaps there's a Linux binary driver available?

Cheers,

- Ben

#3 lore raw
Quoted 24 lines · On Tuesday 17 May 2016 08:03:45 Ben Gamari wrote:
Quoted 8 lines · [email protected] writes:

Dell - Internal Use - Confidential
Hi Ben,

We have just confirmed the touchpad on Latitude E7470 is a PS/2 device, not an I2C-HID input device. The code you listed is common among many Dell products and the value of SDS0 should be provided somewhere (I can't find it out) to specify a PS/2 device.

Thanks Allen,

I rather suspected this; I suppose it's probably hard to find I2C-HID hardware that integrates a touchstick. This explains why SDS0 is 0 on my hardware.

In this case I suppose this is yet another Alps device? I've tried bringing it up with all of the recent Alps protocols supported by the alps.ko driver but sadly nothing seems to emit multitouch events, so it seems likely that there is yet another protocol variant waiting to be implemented. Is there any chance you could see whether Alps might now be more willing to provide protocol documentation? If not, perhaps there's a Linux binary driver available?

Quoted 3 lines

Cheers,

- Ben

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

If you need help with ALPS touchpad, I could try to help.

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
author
#4 lore raw
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

Quoted 5 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

Thanks again for the reference, Pali!

Cheers,

- Ben

#5 lore raw
Quoted 7 lines · On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Quoted 8 lines

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

First you need to identify if your touchpad is ALPS or not. If not then work on rebasing is useless.

To identify your touchpad there are two ways:

1) Disassemble laptop and look what is under palmrest/keyboard. Latitude laptops used to have good documentation how to do it (on official dell site) and older Exx40 series is not hard to detect it...

2) Look at ALPS detection code. Basically all (known) ALPS touchpad response to some PS/2 sequence with specific answer. So you can compile psmouse.ko/alps.c in debug mode and look if it fit detection or not.

I suggest you to do this first investigation step. If touchpad is ALPS or not. I read that some Dell laptops uses synaptics touchpads, so there is non zero chance that touchpad could not be ALPS.

Quoted 8 lines
Quoted 4 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

IIRC All (new) Latitude laptops can be configured with Ubuntu and in this case they come with preinstalled Ubuntu with that support package.

So for sure contact Dell support and ask for it! You can also see Ubuntu as supported system in PDF material about those Latitudes...

Quoted 6 lines
Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

Yes, it would not be simple. Plus for including into mainline kernel needs lot of cleaning (see that email thread).

Quoted 4 lines

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

If you will be 100% sure that touchpad is ALPS, I could contact ALPS people. They helped me a lot with fixing ALPS touchpad support for my E6440...

Quoted 6 lines

Thanks again for the reference, Pali!

Cheers,

- Ben

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
#6 lore raw

Dell - Internal Use - Confidential

Quoted 55 lines · Pali Rohár
Quoted 6 lines · On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Quoted 8 lines

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

First you need to identify if your touchpad is ALPS or not. If not then work on rebasing is useless.

To identify your touchpad there are two ways:

1) Disassemble laptop and look what is under palmrest/keyboard. Latitude laptops used to have good documentation how to do it (on official dell site) and older Exx40 series is not hard to detect it...

2) Look at ALPS detection code. Basically all (known) ALPS touchpad response to some PS/2 sequence with specific answer. So you can compile psmouse.ko/alps.c in debug mode and look if it fit detection or not.

I suggest you to do this first investigation step. If touchpad is ALPS or not. I read that some Dell laptops uses synaptics touchpads, so there is non zero chance that touchpad could not be ALPS.

Quoted 8 lines
Quoted 4 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

IIRC All (new) Latitude laptops can be configured with Ubuntu and in this case they come with preinstalled Ubuntu with that support package.

So for sure contact Dell support and ask for it! You can also see Ubuntu as supported system in PDF material about those Latitudes...

Quoted 6 lines
Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

Yes, it would not be simple. Plus for including into mainline kernel needs lot of cleaning (see that email thread).

Quoted 14 lines
Quoted 4 lines

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

If you will be 100% sure that touchpad is ALPS, I could contact ALPS people. They helped me a lot with fixing ALPS touchpad support for my E6440...

Quoted 6 lines

Thanks again for the reference, Pali!

Cheers,

- Ben

I am confirming with Alps team for what protocol version the E7470 device is speaking. In fact, they sent me the alps.c which support up to V8 and they said it's their latest one. It seems the driver is older than the patch provided in Pali's link (that support up to V9) so I didn't put it here. Will get the answer back to you once they confirm with me.

- Allen
--
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

#7 lore raw
Quoted 66 lines · On Tuesday 17 May 2016 22:46:31 [email protected] wrote:

Dell - Internal Use - Confidential

Quoted 63 lines · Pali Rohár
Quoted 6 lines · On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Quoted 8 lines

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

First you need to identify if your touchpad is ALPS or not. If not then work on rebasing is useless.

To identify your touchpad there are two ways:

1) Disassemble laptop and look what is under palmrest/keyboard. Latitude laptops used to have good documentation how to do it (on official dell site) and older Exx40 series is not hard to detect it...

2) Look at ALPS detection code. Basically all (known) ALPS touchpad response to some PS/2 sequence with specific answer. So you can compile psmouse.ko/alps.c in debug mode and look if it fit detection or not.

I suggest you to do this first investigation step. If touchpad is ALPS or not. I read that some Dell laptops uses synaptics touchpads, so there is non zero chance that touchpad could not be ALPS.

Quoted 8 lines
Quoted 4 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

IIRC All (new) Latitude laptops can be configured with Ubuntu and in this case they come with preinstalled Ubuntu with that support package.

So for sure contact Dell support and ask for it! You can also see Ubuntu as supported system in PDF material about those Latitudes...

Quoted 6 lines
Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

Yes, it would not be simple. Plus for including into mainline kernel needs lot of cleaning (see that email thread).

Quoted 4 lines

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

If you will be 100% sure that touchpad is ALPS, I could contact ALPS people. They helped me a lot with fixing ALPS touchpad support for my E6440...

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

Thanks again for the reference, Pali!

Cheers,

- Ben

I am confirming with Alps team for what protocol version the E7470

Great!

Quoted 2 lines

device is speaking. In fact, they sent me the alps.c which support up to V8 and they said it's their latest one.

Currently alps.c in mainline kernel supports protocol versions V1 to V8. So V9 is missing.

Quoted 2 lines

It seems the driver is older than the patch provided in Pali's link (that support up to V9) so I didn't put it here.

That patch which I sent was generated from Ubuntu support package provided by Dell drivers download package. So somebody in Dell should know more about it...

Quoted 3 lines

Will get the answer back to you once they confirm with me.

- Allen

Ok, thanks!

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
#8 lore raw

Dell - Internal Use - Confidential

Quoted 83 lines · Pali Rohár
Quoted 66 lines · On Tuesday 17 May 2016 22:46:31 [email protected] wrote:

Dell - Internal Use - Confidential

Quoted 63 lines · Pali Rohár
Quoted 6 lines · On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Quoted 8 lines

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

First you need to identify if your touchpad is ALPS or not. If not then work on rebasing is useless.

To identify your touchpad there are two ways:

1) Disassemble laptop and look what is under palmrest/keyboard. Latitude laptops used to have good documentation how to do it (on official dell site) and older Exx40 series is not hard to detect it...

2) Look at ALPS detection code. Basically all (known) ALPS touchpad response to some PS/2 sequence with specific answer. So you can compile psmouse.ko/alps.c in debug mode and look if it fit detection or not.

I suggest you to do this first investigation step. If touchpad is ALPS or not. I read that some Dell laptops uses synaptics touchpads, so there is non zero chance that touchpad could not be ALPS.

Quoted 8 lines
Quoted 4 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

IIRC All (new) Latitude laptops can be configured with Ubuntu and in this case they come with preinstalled Ubuntu with that support package.

So for sure contact Dell support and ask for it! You can also see Ubuntu as supported system in PDF material about those Latitudes...

Quoted 6 lines
Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

Yes, it would not be simple. Plus for including into mainline kernel needs lot of cleaning (see that email thread).

Quoted 4 lines

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

If you will be 100% sure that touchpad is ALPS, I could contact ALPS people. They helped me a lot with fixing ALPS touchpad support for my E6440...

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines

Thanks again for the reference, Pali!

Cheers,

- Ben

I am confirming with Alps team for what protocol version the E7470

Great!

Quoted 2 lines

device is speaking. In fact, they sent me the alps.c which support up to V8 and they said it's their latest one.

Currently alps.c in mainline kernel supports protocol versions V1 to V8. So V9 is missing.

Quoted 2 lines

It seems the driver is older than the patch provided in Pali's link (that support up to V9) so I didn't put it here.

Quoted 9 lines

That patch which I sent was generated from Ubuntu support package provided by Dell drivers download package. So somebody in Dell should know more about it...

Quoted 3 lines

Will get the answer back to you once they confirm with me.

- Allen

Ok, thanks!

I got responds from Alps and they confirmed that the Alps devices in Dell systems are speaking in protocol V8. The devices that speak in protocol V9 are using different ASIC hardware and they are not used in Dell systems..

- Allen
--
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

#9 lore raw
Quoted 92 lines · On Wednesday 25 May 2016 12:38:15 [email protected] wrote:

Dell - Internal Use - Confidential

Quoted 89 lines · Pali Rohár
Quoted 66 lines · On Tuesday 17 May 2016 22:46:31 [email protected] wrote:

Dell - Internal Use - Confidential

Quoted 63 lines · Pali Rohár
Quoted 6 lines · On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
Quoted 4 lines · Pali Rohár

Hi Ben!

Maybe it could help you, look at my email sent to linux-input ML year
ago: http://thread.gmane.org/gmane.linux.kernel.input/41210

Quoted 8 lines

Hi Pali!

Thanks, this looks great (assuming this is in fact the protocol spoken by the E7470 hardware; perhaps Allen could confirm this?). I'll have a go at rebasing this sometime soon, although it looks like this may take a fair bit of work as the patch is of the usual... questionable quality that you'd expect from a hardware vendor and on top of that the driver itself seems to have evolved significantly.

First you need to identify if your touchpad is ALPS or not. If not then work on rebasing is useless.

To identify your touchpad there are two ways:

1) Disassemble laptop and look what is under palmrest/keyboard. Latitude laptops used to have good documentation how to do it (on official dell site) and older Exx40 series is not hard to detect it...

2) Look at ALPS detection code. Basically all (known) ALPS touchpad response to some PS/2 sequence with specific answer. So you can compile psmouse.ko/alps.c in debug mode and look if it fit detection or not.

I suggest you to do this first investigation step. If touchpad is ALPS or not. I read that some Dell laptops uses synaptics touchpads, so there is non zero chance that touchpad could not be ALPS.

Quoted 8 lines
Quoted 4 lines

Also try to look at dell drivers page, there could be linux package for your laptop with drivers. Lot of them used to be in dkms format (upstream source code with dell changes).

I've been unable to find a support package for my machine on the web site. However, I'm also in touch with Dell through the usual support channel so perhaps they'll be able to provide a more up-to-date code drop.

IIRC All (new) Latitude laptops can be configured with Ubuntu and in this case they come with preinstalled Ubuntu with that support package.

So for sure contact Dell support and ask for it! You can also see Ubuntu as supported system in PDF material about those Latitudes...

Quoted 6 lines
Quoted 4 lines

ALPS code from Dell were open source, it was just hard to find it and compile it on other then one kernel version. And harder to generate patch (like I did in above email)...

Right, as I said it looks like rebasing this code drop onto a recent kernel might require quite some effort.

Yes, it would not be simple. Plus for including into mainline kernel needs lot of cleaning (see that email thread).

Quoted 4 lines

I do wish that Dell would apply more pressure on their input device vendors to take upstream support (or open protocol documentation) seriously. It's very frustrating that we need to go through this same process with every hardware iteration.

If you will be 100% sure that touchpad is ALPS, I could contact ALPS people. They helped me a lot with fixing ALPS touchpad support for my E6440...

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines

Thanks again for the reference, Pali!

Cheers,

- Ben

I am confirming with Alps team for what protocol version the E7470

Great!

Quoted 2 lines

device is speaking. In fact, they sent me the alps.c which support up to V8 and they said it's their latest one.

Currently alps.c in mainline kernel supports protocol versions V1 to V8. So V9 is missing.

Quoted 2 lines

It seems the driver is older than the patch provided in Pali's link (that support up to V9) so I didn't put it here.

That patch which I sent was generated from Ubuntu support package provided by Dell drivers download package. So somebody in Dell should know more about it...

Quoted 2 lines

Will get the answer back to you once they confirm with me.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

- Allen

Ok, thanks!

I got responds from Alps and they confirmed that the Alps devices in Dell systems are speaking in protocol V8. The devices that speak in protocol V9 are using different ASIC hardware and they are not used in Dell systems..

- Allen

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

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
author
#10 lore raw
Quoted 7 lines · Pali Rohár
Quoted 6 lines · On Wednesday 25 May 2016 12:38:15 [email protected] wrote:

I got responds from Alps and they confirmed that the Alps devices in Dell systems are speaking in protocol V8. The devices that speak in protocol V9 are using different ASIC hardware and they are not used in Dell systems..

Thanks Allen!

Quoted 5 lines

Hi Allen, thank you for confirmation.

Ben, V8 protocol is supported by linux kernel since version 4.1. Do you have needed version?

Yes, I have been running 4.5 and 4.6.

Quoted 4 lines

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

As I mentioned earlier, the device is certainly not recognized as an ALPS device,

     [  367.097253] input: ImPS/2 BYD TouchPad as /devices/platform/i8042/serio1/input/input21

If I rmmod psmouse; modprobe psmouse dyndbg==pm I find this,

    [  714.520655] psmouse: psmouse serio1: cypress_ps2: send extension cmd 0x00, [0 0 0 0]
    [  714.748482] psmouse: psmouse serio1: cypress_ps2: Command 0x00 response data (0x): 00 00 14
    [  714.781858] psmouse: psmouse serio1: alps: E6 report: 00 00 64
    [  714.804749] psmouse: psmouse serio1: alps: E7 report: 73 03 28
    [  714.830829] psmouse: psmouse serio1: alps: EC report: 73 01 13
    [  714.833568] psmouse: psmouse serio1: alps: Likely not an ALPS touchpad: E7=73 03 28, EC=73 01 13
    [  714.860923] psmouse: psmouse serio1: elantech: unexpected magic knock result 0x00, 0x02, 0x64.
    [  714.947527] psmouse: psmouse serio1: byd: BYD touchpad detected
    [  715.869113] input: ImPS/2 BYD TouchPad as /devices/platform/i8042/serio1/input/input24

This seems like quite a hint.

Cheers,

- Ben

#11 lore raw
Quoted 4 lines · On Wednesday 25 May 2016 14:09:57 Ben Gamari wrote:
    [  714.781858] psmouse: psmouse serio1: alps: E6 report: 00 00 64
    [  714.804749] psmouse: psmouse serio1: alps: E7 report: 73 03 28
    [  714.830829] psmouse: psmouse serio1: alps: EC report: 73 01 13
    [  714.833568] psmouse: psmouse serio1: alps: Likely not an ALPS touchpad: E7=73 03 28, EC=73 01 13

Great! This allow us to identify touchpad more precious.

Adding people who signed/acked alps commit which added V8 protocol support. Above touchpad should has V8 protocol too. And it is with trackstick.

Any idea why is not recognized?

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

Hi,

Quoted 6 lines · Pali Rohár
Quoted 4 lines · On Wednesday 25 May 2016 14:09:57 Ben Gamari wrote:
    [  714.781858] psmouse: psmouse serio1: alps: E6 report: 00 00 64
    [  714.804749] psmouse: psmouse serio1: alps: E7 report: 73 03 28
    [  714.830829] psmouse: psmouse serio1: alps: EC report: 73 01 13
    [  714.833568] psmouse: psmouse serio1: alps: Likely not an ALPS touchpad: E7=73 03 28, EC=73 01 13
Quoted 7 lines

Great! This allow us to identify touchpad more precious.

Adding people who signed/acked alps commit which added V8 protocol support. Above touchpad should has V8 protocol too. And it is with trackstick.

Any idea why is not recognized?

This is likely one of the new hid based touchpad / trackstick combo-s.

See this mail (and attached patch):

http://www.spinics.net/lists/linux-input/msg44764.html

For a driver for this. If the reporter can build a test-kernel with this patch and let us know if that makes things work, that would be great.

If the reporter is running Fedora I can provide a test-kernel with this patch.

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

#13 lore raw
Quoted 12 lines · On Wednesday 25 May 2016 17:19:11 Hans de Goede wrote:

Hi,

Quoted 9 lines · Pali Rohár
Quoted 5 lines · On Wednesday 25 May 2016 14:09:57 Ben Gamari wrote:
    [  714.781858] psmouse: psmouse serio1: alps: E6 report: 00 00
    64 [  714.804749] psmouse: psmouse serio1: alps: E7 report:
    73 03 28 [  714.830829] psmouse: psmouse serio1: alps: EC
    report: 73 01 13 [  714.833568] psmouse: psmouse serio1:
    alps: Likely not an ALPS touchpad: E7=73 03 28, EC=73 01 13

Great! This allow us to identify touchpad more precious.

Quoted 8 lines
Quoted 5 lines

Adding people who signed/acked alps commit which added V8 protocol support. Above touchpad should has V8 protocol too. And it is with trackstick.

Any idea why is not recognized?

This is likely one of the new hid based touchpad / trackstick combo-s.

Allen Hung already wrote:

"We have just confirmed the touchpad on Latitude E7470 is a PS/2 device, not an I2C-HID input device."

and

"I got responds from Alps and they confirmed that the Alps devices in Dell systems are speaking in protocol V8."

So I would say, it is really PS/2 device and we are missing support for it in alps V8 protocol ...

Signature · 2 lines
Pali Rohár
[email protected]
author
#14 lore raw
In reply to Pali Rohár
Quoted 7 lines · Pali Rohár

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 <[email protected]>
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(+)
drivers/input/mouse/alps.c +3 -0
index 936f07a..a0c5dfe 100644
@@ -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);
Signature · 12 lines
2.8.1



From ea668a46bfbc4165841368a75b197febb09c5b33 Mon Sep 17 00:00:00 2001
From: Ben Gamari <[email protected]>
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(-)
drivers/input/mouse/alps.c +1 -3
index a0c5dfe..a034933 100644
@@ -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);
Signature · 1 line
2.8.1
#15 lore raw
Quoted 9 lines · On Wednesday 25 May 2016 14:32:28 Ben Gamari wrote:
Quoted 7 lines · Pali Rohár

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

Quoted 4 lines

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?

Quoted 1 line

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?

Quoted 2 lines

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.

Quoted 1 line

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?

Quoted 31 lines

Cheers,

- Ben

From 73f99f86c77d39ff512f2064ca9f2002c6404dd9 Mon Sep 17 00:00:00 2001
From: Ben Gamari <[email protected]>
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(+)
drivers/input/mouse/alps.c +3 -0
index 936f07a..a0c5dfe 100644
@@ -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);
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
#16 lore raw

Hi,

Quoted 40 lines · Pali Rohár
Quoted 9 lines · On Wednesday 25 May 2016 14:32:28 Ben Gamari wrote:
Quoted 7 lines · Pali Rohár

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

Quoted 4 lines

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?

Quoted 1 line

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?

Quoted 2 lines

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.

Quoted 1 line

Ideas?

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

Quoted 6 lines

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

Quoted 18 lines
Quoted 18 lines

Cheers,

- Ben

From 73f99f86c77d39ff512f2064ca9f2002c6404dd9 Mon Sep 17 00:00:00 2001
From: Ben Gamari <[email protected]>
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(+)
Quoted 15 lines
Quoted 5 lines
drivers/input/mouse/alps.c +0 -0
index 936f07a..a0c5dfe 100644

drivers/input/mouse/alps.c static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) · line 2775

Quoted 9 lines
drivers/input/mouse/alps.c +3 -0
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#17 lore raw
In reply to Pali Rohár
Quoted 7 lines · Pali Rohár
Quoted 5 lines · 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.

Quoted 7 lines

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.

Quoted 7 lines
Quoted 1 line

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.

Quoted 6 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 1 line

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

#18 lore raw

Packet format for ALPS V8 trackstick (Was: Re: Dell Latitude E7470 touchpad status)

Quoted 6 lines · On Wednesday 25 May 2016 17:53:22 Ben Gamari wrote:
Quoted 2 lines · Pali Rohár

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?

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

PATCH 1/1 Alps SS4 V2 support for Dell Latitude 7470

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

author
#20 lore raw

PATCH 1/3 input/alps: Split up ALPS_BUTTONPAD behavior change

It seems that curerntly ALPS_BUTTONPAD is rather overloaded. First, it disables a number of key events (since presumably buttonpads have only one button). Secondly, it seems to change the decoding behavior of position data. In the case of the Latitude 7470's touchpad we need the modified position decoding but keeping all of the buttons. Introduce a new flag, ALPS_SS4_V4_ALT_DECODING, to capture this.

---
 drivers/input/mouse/alps.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/input/mouse/alps.c +9 -3
index 936f07a..daf9421 100644
@@ -104,6 +104,11 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = {
 #define ALPS_STICK_BITS		0x100	/* separate stick button bits */
 #define ALPS_BUTTONPAD		0x200	/* device is a clickpad */
 
+/*
+ * Button-pad and some other SS4 V2 devices use an alternative position decoding
+*/
+#define ALPS_SS4_V2_ALT_DECODING	0x400
+
 static const struct alps_model_info alps_model_data[] = {
 	{ { 0x32, 0x02, 0x14 }, 0x00, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT } },	/* Toshiba Salellite Pro M10 */
 	{ { 0x33, 0x02, 0x0a }, 0x00, { ALPS_PROTO_V1, 0x88, 0xf8, 0 } },				/* UMAX-530T */
@@ -1191,7 +1196,7 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
 		break;
 
 	case SS4_PACKET_ID_TWO:
-		if (priv->flags & ALPS_BUTTONPAD) {
+		if (priv->flags & ALPS_SS4_V2_ALT_DECODING) {
 			f->mt[0].x = SS4_BTL_MF_X_V2(p, 0);
 			f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0);
 			f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
@@ -1215,7 +1220,7 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
 		break;
 
 	case SS4_PACKET_ID_MULTI:
-		if (priv->flags & ALPS_BUTTONPAD) {
+		if (priv->flags & ALPS_SS4_V2_ALT_DECODING) {
 			f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
 			f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0);
 			f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
@@ -2429,8 +2434,9 @@ static int alps_update_btn_info_ss4_v2(unsigned char otp[][4],
 
 	is_btnless = (otp[1][1] >> 3) & 0x01;
 
+	/* buttonless devices also use the alternative position decoding */
 	if (is_btnless)
-		priv->flags |= ALPS_BUTTONPAD;
+		priv->flags |= ALPS_BUTTONPAD | ALPS_SS4_V2_ALT_DECODING;
 
 	return 0;
 }
Signature · 1 line
2.8.1
author
#21 lore raw

PATCH 2/3 input/alps: Add touchstick support for V8 protocol devices

In reply to Ben Gamari
---
 drivers/input/mouse/alps.c | 64 ++++++++++++++++++++++++++++++++++++++--------
 drivers/input/mouse/alps.h |  2 ++
 2 files changed, 55 insertions(+), 11 deletions(-)
drivers/input/mouse/alps.c +53 -11
index daf9421..10e6836 100644
@@ -1161,15 +1161,27 @@ static unsigned char alps_get_pkt_id_ss4_v2(unsigned char *byte)
 {
 	unsigned char pkt_id = SS4_PACKET_ID_IDLE;
 
-	if (byte[0] == 0x18 && byte[1] == 0x10 && byte[2] == 0x00 &&
-	    (byte[3] & 0x88) == 0x08 && byte[4] == 0x10 && byte[5] == 0x00) {
-		pkt_id = SS4_PACKET_ID_IDLE;
-	} else if (!(byte[3] & 0x10)) {
-		pkt_id = SS4_PACKET_ID_ONE;
-	} else if (!(byte[3] & 0x20)) {
+	switch (byte[3] & 0x30) {
+	case 0x00:
+		if (byte[0] == 0x18 && byte[1] == 0x10 && byte[2] == 0x00 &&
+				(byte[3] & 0x88) == 0x08 && byte[4] == 0x10 && byte[5] == 0x00) {
+			pkt_id = SS4_PACKET_ID_IDLE;
+		} else {
+			pkt_id = SS4_PACKET_ID_ONE;
+		}
+		break;
+	case 0x10:
+		/* two-finger finger positions */
 		pkt_id = SS4_PACKET_ID_TWO;
-	} else {
+		break;
+	case 0x20:
+		/* stick pointer */
+		pkt_id = SS4_PACKET_ID_STICK;
+		break;
+	case 0x30:
+		/* third and fourth finger positions */
 		pkt_id = SS4_PACKET_ID_MULTI;
+		break;
 	}
 
 	return pkt_id;
@@ -1251,16 +1263,38 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
 		}
 		break;
 
+	case SS4_PACKET_ID_STICK:
+		if (!(priv->flags & ALPS_DUALPOINT)) {
+			psmouse_warn(psmouse,
+				     "Rejected trackstick packet from non DualPoint device");
+		} else {
+			int x = (s8)(((p[0] & 1) << 7) | (p[1] & 0x7f));
+			int y = (s8)(((p[3] & 1) << 7) | (p[2] & 0x7f));
+
+			input_report_rel(priv->dev2, REL_X, x);
+			input_report_rel(priv->dev2, REL_Y, -y);
+		}
+		break;
+
 	case SS4_PACKET_ID_IDLE:
 	default:
 		memset(f, 0, sizeof(struct alps_fields));
 		break;
 	}
 
-	f->left = !!(SS4_BTN_V2(p) & 0x01);
-	if (!(priv->flags & ALPS_BUTTONPAD)) {
-		f->right = !!(SS4_BTN_V2(p) & 0x02);
-		f->middle = !!(SS4_BTN_V2(p) & 0x04);
+	/* handle buttons */
+	if (pkt_id == SS4_PACKET_ID_STICK) {
+		f->ts_left = !!(SS4_BTN_V2(p) & 0x01);
+		if (!(priv->flags & ALPS_BUTTONPAD)) {
+			f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
+			f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
+		}
+	} else {
+		f->left = !!(SS4_BTN_V2(p) & 0x01);
+		if (!(priv->flags & ALPS_BUTTONPAD)) {
+			f->right = !!(SS4_BTN_V2(p) & 0x02);
+			f->middle = !!(SS4_BTN_V2(p) & 0x04);
+		}
 	}
 
 	return 0;
@@ -1271,6 +1305,7 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse)
 	struct alps_data *priv = psmouse->private;
 	unsigned char *packet = psmouse->packet;
 	struct input_dev *dev = psmouse->dev;
+	struct input_dev *dev2 = priv->dev2;
 	struct alps_fields *f = &priv->f;
 
 	memset(f, 0, sizeof(struct alps_fields));
@@ -1316,6 +1351,13 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse)
 
 	input_report_abs(dev, ABS_PRESSURE, f->pressure);
 	input_sync(dev);
+
+	if (priv->flags & ALPS_DUALPOINT) {
+          input_report_key(dev2, BTN_LEFT, f->ts_left);
+          input_report_key(dev2, BTN_RIGHT, f->ts_right);
+          input_report_key(dev2, BTN_MIDDLE, f->ts_middle);
+          input_sync(dev2);
+	}
 }
 
 static bool alps_is_valid_package_ss4_v2(struct psmouse *psmouse)
drivers/input/mouse/alps.h +2 -0
index d37f814..b9417e2 100644
@@ -37,12 +37,14 @@
  *  or there's button activities.
  * SS4_PACKET_ID_TWO: There's two or more fingers on touchpad
  * SS4_PACKET_ID_MULTI: There's three or more fingers on touchpad
+ * SS4_PACKET_ID_STICK: A stick pointer packet
 */
 enum SS4_PACKET_ID {
 	SS4_PACKET_ID_IDLE = 0,
 	SS4_PACKET_ID_ONE,
 	SS4_PACKET_ID_TWO,
 	SS4_PACKET_ID_MULTI,
+	SS4_PACKET_ID_STICK,
 };
 
 #define SS4_COUNT_PER_ELECTRODE		256
Signature · 1 line
2.8.1
author
#22 lore raw

PATCH 3/3 input/alps: Add device description for Dell Latitude E7470

In reply to Ben Gamari
---
 drivers/input/mouse/alps.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/mouse/alps.c +1 -0
index 10e6836..eb4bf31 100644
@@ -143,6 +143,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_SS4_V2_ALT_DECODING | ALPS_DUALPOINT } }, /* Dell Latitude E7470 */
 };
 
 static const struct alps_protocol_info alps_v3_protocol_data = {
Signature · 1 line
2.8.1
#23 lore raw

Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470

Quoted 9 lines · On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:
---
 drivers/input/mouse/alps.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/mouse/alps.c +0 -0
index 10e6836..eb4bf31 100644

drivers/input/mouse/alps.c static const struct alps_model_info alps_model_data[] = { · line 149

Quoted 7 lines
drivers/input/mouse/alps.c +1 -0
@@ -143,6 +143,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_SS4_V2_ALT_DECODING | ALPS_DUALPOINT } }, /* Dell Latitude E7470 */
 };
 
 static const struct alps_protocol_info alps_v3_protocol_data = {

Hi! I would rather move this code into alps_identify and probably create alps_v8_ss<name>_data structure for it.

Above alps_model_data list looks like hooks for special touchpads which needs more flags to work correctly...

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
#24 lore raw

Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470

Hi,

Quoted 16 lines · Pali Rohár
Quoted 15 lines · On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:
---
 drivers/input/mouse/alps.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/mouse/alps.c +1 -0
index 10e6836..eb4bf31 100644
@@ -143,6 +143,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_SS4_V2_ALT_DECODING | ALPS_DUALPOINT } }, /* Dell Latitude E7470 */
 };
 
Quoted 7 lines

drivers/input/mouse/alps.c static const struct alps_model_info alps_model_data[] = { · line 149

Quoted 1 line
drivers/input/mouse/alps.c +0 -0
 static const struct alps_protocol_info alps_v3_protocol_data = {

Hi! I would rather move this code into alps_identify and probably create alps_v8_ss<name>_data structure for it.

Above alps_model_data list looks like hooks for special touchpads which needs more flags to work correctly...

Agreed, the alps_model_data array is really only used for quirks for old touchpads and should not be used for new touchpads.

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

#25 lore raw

Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470

Quoted 24 lines · On Thursday 26 May 2016 14:19:18 Hans de Goede wrote:

Hi,

Quoted 21 lines · Pali Rohár
Quoted 9 lines · On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:

---
drivers/input/mouse/alps.c | 1 +

1 file changed, 1 insertion(+)
drivers/input/mouse/alps.c +0 -0
index 10e6836..eb4bf31 100644

drivers/input/mouse/alps.c static const struct alps_model_info alps_model_data[] = { · line 149

Quoted 7 lines
drivers/input/mouse/alps.c +1 -0
@@ -143,6 +143,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_SS4_V2_ALT_DECODING | ALPS_DUALPOINT } }, /* Dell Latitude E7470 */
 };
 
 static const struct alps_protocol_info alps_v3_protocol_data = {

Hi! I would rather move this code into alps_identify and probably create alps_v8_ss<name>_data structure for it.

Quoted 5 lines
Quoted 2 lines

Above alps_model_data list looks like hooks for special touchpads which needs more flags to work correctly...

Agreed, the alps_model_data array is really only used for quirks for old touchpads and should not be used for new touchpads.

Ben: Or maybe new structure for alps_identify is not needed at all. Just set flags based on e7 data (if it has 0x28 or not).

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