All of lore.kernel.org
 help / color / mirror / Atom feed
* Dell Latitude E7470 touchpad status
@ 2016-05-03 13:31 Ben Gamari
       [not found] ` <23E0F704395E694FA4710C833FA087E50D40B8BF13@TPEX7ADC101.APAC.DELL.COM>
  0 siblings, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-03 13:31 UTC (permalink / raw)
  To: Allen Hung, Mario Limonciello; +Cc: linux-input

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

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
    }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* RE: Dell Latitude E7470 touchpad status
       [not found] ` <23E0F704395E694FA4710C833FA087E50D40B8BF13@TPEX7ADC101.APAC.DELL.COM>
@ 2016-05-17  6:03   ` Ben Gamari
  2016-05-17  8:23     ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-17  6:03 UTC (permalink / raw)
  To: Allen_Hung, Mario_Limonciello; +Cc: linux-input

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

Allen_Hung@Dell.com 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-17  6:03   ` Ben Gamari
@ 2016-05-17  8:23     ` Pali Rohár
  2016-05-17  9:50       ` Ben Gamari
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-17  8:23 UTC (permalink / raw)
  To: Ben Gamari; +Cc: Allen_Hung, Mario_Limonciello, linux-input

On Tuesday 17 May 2016 08:03:45 Ben Gamari wrote:
> Allen_Hung@Dell.com 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

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.

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-17  8:23     ` Pali Rohár
@ 2016-05-17  9:50       ` Ben Gamari
  2016-05-17 13:16         ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-17  9:50 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Allen_Hung, Mario_Limonciello, linux-input

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

Pali Rohár <pali.rohar@gmail.com> writes:

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

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

> 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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-17  9:50       ` Ben Gamari
@ 2016-05-17 13:16         ` Pali Rohár
  2016-05-17 14:46           ` Allen_Hung
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-17 13:16 UTC (permalink / raw)
  To: Ben Gamari; +Cc: Allen_Hung, Mario_Limonciello, linux-input

On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
> Pali Rohár <pali.rohar@gmail.com> writes:
> 
> > 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.

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.

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

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

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

> Thanks again for the reference, Pali!
> 
> Cheers,
> 
> - Ben
> 

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* RE: Dell Latitude E7470 touchpad status
  2016-05-17 13:16         ` Pali Rohár
@ 2016-05-17 14:46           ` Allen_Hung
  2016-05-17 15:22             ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Allen_Hung @ 2016-05-17 14:46 UTC (permalink / raw)
  To: pali.rohar, ben; +Cc: Mario_Limonciello, linux-input

Dell - Internal Use - Confidential 

On 05/17/2016 09:16 PM, Pali Rohár wrote:
> On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
>> Pali Rohár <pali.rohar@gmail.com> writes:
>>
>>> 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.
> 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.
>
>>> 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...
>
>>> 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).
>
>> 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...
>
>> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-17 14:46           ` Allen_Hung
@ 2016-05-17 15:22             ` Pali Rohár
  2016-05-25  4:38               ` Allen_Hung
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-17 15:22 UTC (permalink / raw)
  To: Allen_Hung; +Cc: ben, Mario_Limonciello, linux-input

On Tuesday 17 May 2016 22:46:31 Allen_Hung@Dell.com wrote:
> Dell - Internal Use - Confidential 
> 
> On 05/17/2016 09:16 PM, Pali Rohár wrote:
> > On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
> >> Pali Rohár <pali.rohar@gmail.com> writes:
> >>
> >>> 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.
> > 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.
> >
> >>> 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...
> >
> >>> 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).
> >
> >> 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...
> >
> >> Thanks again for the reference, Pali!
> >>
> >> Cheers,
> >>
> >> - Ben
> >>
> 
> I am confirming with Alps team for what protocol version the E7470

Great!

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

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

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

Ok, thanks!

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* RE: Dell Latitude E7470 touchpad status
  2016-05-17 15:22             ` Pali Rohár
@ 2016-05-25  4:38               ` Allen_Hung
  2016-05-25  7:39                 ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Allen_Hung @ 2016-05-25  4:38 UTC (permalink / raw)
  To: pali.rohar; +Cc: ben, Mario_Limonciello, linux-input

Dell - Internal Use - Confidential 

On 05/17/2016 11:22 PM, Pali Rohár wrote:
> On Tuesday 17 May 2016 22:46:31 Allen_Hung@Dell.com wrote:
>> Dell - Internal Use - Confidential 
>>
>> On 05/17/2016 09:16 PM, Pali Rohár wrote:
>>> On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
>>>> Pali Rohár <pali.rohar@gmail.com> writes:
>>>>
>>>>> 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.
>>> 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.
>>>
>>>>> 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...
>>>
>>>>> 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).
>>>
>>>> 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...
>>>
>>>> Thanks again for the reference, Pali!
>>>>
>>>> Cheers,
>>>>
>>>> - Ben
>>>>
>> I am confirming with Alps team for what protocol version the E7470
> Great!
>
>> 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.
>
>> 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...
>
>> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25  4:38               ` Allen_Hung
@ 2016-05-25  7:39                 ` Pali Rohár
  2016-05-25 12:09                   ` Ben Gamari
  2016-05-25 12:32                   ` Ben Gamari
  0 siblings, 2 replies; 25+ messages in thread
From: Pali Rohár @ 2016-05-25  7:39 UTC (permalink / raw)
  To: Allen_Hung, ben; +Cc: Mario_Limonciello, linux-input

On Wednesday 25 May 2016 12:38:15 Allen_Hung@Dell.com wrote:
> Dell - Internal Use - Confidential 
> 
> On 05/17/2016 11:22 PM, Pali Rohár wrote:
> > On Tuesday 17 May 2016 22:46:31 Allen_Hung@Dell.com wrote:
> >> Dell - Internal Use - Confidential 
> >>
> >> On 05/17/2016 09:16 PM, Pali Rohár wrote:
> >>> On Tuesday 17 May 2016 11:50:06 Ben Gamari wrote:
> >>>> Pali Rohár <pali.rohar@gmail.com> writes:
> >>>>
> >>>>> 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.
> >>> 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.
> >>>
> >>>>> 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...
> >>>
> >>>>> 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).
> >>>
> >>>> 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...
> >>>
> >>>> Thanks again for the reference, Pali!
> >>>>
> >>>> Cheers,
> >>>>
> >>>> - Ben
> >>>>
> >> I am confirming with Alps team for what protocol version the E7470
> > Great!
> >
> >> 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.
> >
> >> 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...
> >
> >> 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

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

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25  7:39                 ` Pali Rohár
@ 2016-05-25 12:09                   ` Ben Gamari
  2016-05-25 14:45                     ` Pali Rohár
  2016-05-25 12:32                   ` Ben Gamari
  1 sibling, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-25 12:09 UTC (permalink / raw)
  To: Pali Rohár, Allen_Hung; +Cc: Mario_Limonciello, linux-input

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

Pali Rohár <pali.rohar@gmail.com> writes:

> On Wednesday 25 May 2016 12:38:15 Allen_Hung@Dell.com 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!

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

> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25  7:39                 ` Pali Rohár
  2016-05-25 12:09                   ` Ben Gamari
@ 2016-05-25 12:32                   ` Ben Gamari
  2016-05-25 15:43                     ` Pali Rohár
  1 sibling, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-25 12:32 UTC (permalink / raw)
  To: Pali Rohár, Allen_Hung; +Cc: Mario_Limonciello, linux-input

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

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(+)

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);
-- 
2.8.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 12:09                   ` Ben Gamari
@ 2016-05-25 14:45                     ` Pali Rohár
  2016-05-25 15:19                       ` Hans de Goede
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-25 14:45 UTC (permalink / raw)
  To: Ben Gamari, Masaki Ota, Hans de Goede, Dmitry Torokhov
  Cc: Allen_Hung, Mario_Limonciello, linux-input

[-- Attachment #1: Type: Text/Plain, Size: 667 bytes --]

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?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 14:45                     ` Pali Rohár
@ 2016-05-25 15:19                       ` Hans de Goede
  2016-05-25 15:32                         ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Hans de Goede @ 2016-05-25 15:19 UTC (permalink / raw)
  To: Pali Rohár, Ben Gamari, Masaki Ota, Dmitry Torokhov
  Cc: Allen_Hung, Mario_Limonciello, linux-input

Hi,

On 25-05-16 16:45, Pali Rohár wrote:
> 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?

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 15:19                       ` Hans de Goede
@ 2016-05-25 15:32                         ` Pali Rohár
  0 siblings, 0 replies; 25+ messages in thread
From: Pali Rohár @ 2016-05-25 15:32 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Ben Gamari, Masaki Ota, Dmitry Torokhov, Allen_Hung,
	Mario_Limonciello, linux-input

[-- Attachment #1: Type: Text/Plain, Size: 1280 bytes --]

On Wednesday 25 May 2016 17:19:11 Hans de Goede wrote:
> Hi,
> 
> On 25-05-16 16:45, Pali Rohár wrote:
> > 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?
> 
> 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 ...

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 12:32                   ` Ben Gamari
@ 2016-05-25 15:43                     ` Pali Rohár
  2016-05-25 15:47                       ` Hans de Goede
  2016-05-25 15:53                       ` Ben Gamari
  0 siblings, 2 replies; 25+ messages in thread
From: Pali Rohár @ 2016-05-25 15:43 UTC (permalink / raw)
  To: Hans de Goede, Ben Gamari
  Cc: Allen_Hung, Mario_Limonciello, linux-input, Masaki Ota, Dmitry Torokhov

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

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 15:43                     ` Pali Rohár
@ 2016-05-25 15:47                       ` Hans de Goede
  2016-05-25 15:53                       ` Ben Gamari
  1 sibling, 0 replies; 25+ messages in thread
From: Hans de Goede @ 2016-05-25 15:47 UTC (permalink / raw)
  To: Pali Rohár, Ben Gamari
  Cc: Allen_Hung, Mario_Limonciello, linux-input, Masaki Ota, Dmitry Torokhov

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

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

* Re: Dell Latitude E7470 touchpad status
  2016-05-25 15:43                     ` Pali Rohár
  2016-05-25 15:47                       ` Hans de Goede
@ 2016-05-25 15:53                       ` Ben Gamari
  2016-05-25 16:01                         ` Packet format for ALPS V8 trackstick (Was: Re: Dell Latitude E7470 touchpad status) Pali Rohár
  1 sibling, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-25 15:53 UTC (permalink / raw)
  To: Pali Rohár, Hans de Goede
  Cc: Allen_Hung, Mario_Limonciello, linux-input, Masaki Ota, Dmitry Torokhov

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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Packet format for ALPS V8 trackstick (Was: Re: Dell Latitude E7470 touchpad status)
  2016-05-25 15:53                       ` Ben Gamari
@ 2016-05-25 16:01                         ` Pali Rohár
  2016-05-26  8:55                           ` [PATCH] Alps SS4 V2 support for Dell Latitude 7470 Ben Gamari
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-25 16:01 UTC (permalink / raw)
  To: Masaki Ota
  Cc: Ben Gamari, Hans de Goede, Allen_Hung, Mario_Limonciello,
	linux-input, Dmitry Torokhov

[-- Attachment #1: Type: Text/Plain, Size: 485 bytes --]

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?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* [PATCH] Alps SS4 V2 support for Dell Latitude 7470
  2016-05-25 16:01                         ` Packet format for ALPS V8 trackstick (Was: Re: Dell Latitude E7470 touchpad status) Pali Rohár
@ 2016-05-26  8:55                           ` Ben Gamari
  2016-05-26  8:55                             ` [PATCH 1/3] input/alps: Split up ALPS_BUTTONPAD behavior change Ben Gamari
                                               ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Ben Gamari @ 2016-05-26  8:55 UTC (permalink / raw)
  To: Pali Rohár, linux-input; +Cc: Hans de Goede, Allen Hung, Masaki Ota


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

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

* [PATCH 1/3] input/alps: Split up ALPS_BUTTONPAD behavior change
  2016-05-26  8:55                           ` [PATCH] Alps SS4 V2 support for Dell Latitude 7470 Ben Gamari
@ 2016-05-26  8:55                             ` Ben Gamari
  2016-05-26  8:55                             ` [PATCH 2/3] input/alps: Add touchstick support for V8 protocol devices Ben Gamari
  2016-05-26  8:55                             ` [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470 Ben Gamari
  2 siblings, 0 replies; 25+ messages in thread
From: Ben Gamari @ 2016-05-26  8:55 UTC (permalink / raw)
  To: Pali Rohár, linux-input
  Cc: Hans de Goede, Allen Hung, Masaki Ota, Ben Gamari

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

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 936f07a..daf9421 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -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;
 }
-- 
2.8.1


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

* [PATCH 2/3] input/alps: Add touchstick support for V8 protocol devices
  2016-05-26  8:55                           ` [PATCH] Alps SS4 V2 support for Dell Latitude 7470 Ben Gamari
  2016-05-26  8:55                             ` [PATCH 1/3] input/alps: Split up ALPS_BUTTONPAD behavior change Ben Gamari
@ 2016-05-26  8:55                             ` Ben Gamari
  2016-05-26  8:55                             ` [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470 Ben Gamari
  2 siblings, 0 replies; 25+ messages in thread
From: Ben Gamari @ 2016-05-26  8:55 UTC (permalink / raw)
  To: Pali Rohár, linux-input
  Cc: Hans de Goede, Allen Hung, Masaki Ota, Ben Gamari

---
 drivers/input/mouse/alps.c | 64 ++++++++++++++++++++++++++++++++++++++--------
 drivers/input/mouse/alps.h |  2 ++
 2 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index daf9421..10e6836 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -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)
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index d37f814..b9417e2 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -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
-- 
2.8.1


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

* [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470
  2016-05-26  8:55                           ` [PATCH] Alps SS4 V2 support for Dell Latitude 7470 Ben Gamari
  2016-05-26  8:55                             ` [PATCH 1/3] input/alps: Split up ALPS_BUTTONPAD behavior change Ben Gamari
  2016-05-26  8:55                             ` [PATCH 2/3] input/alps: Add touchstick support for V8 protocol devices Ben Gamari
@ 2016-05-26  8:55                             ` Ben Gamari
  2016-05-26  9:05                               ` Pali Rohár
  2 siblings, 1 reply; 25+ messages in thread
From: Ben Gamari @ 2016-05-26  8:55 UTC (permalink / raw)
  To: Pali Rohár, linux-input
  Cc: Hans de Goede, Allen Hung, Masaki Ota, Ben Gamari

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

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 10e6836..eb4bf31 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -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 = {
-- 
2.8.1


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

* Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470
  2016-05-26  8:55                             ` [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470 Ben Gamari
@ 2016-05-26  9:05                               ` Pali Rohár
  2016-05-26 12:19                                 ` Hans de Goede
  0 siblings, 1 reply; 25+ messages in thread
From: Pali Rohár @ 2016-05-26  9:05 UTC (permalink / raw)
  To: Ben Gamari; +Cc: linux-input, Hans de Goede, Allen Hung, Masaki Ota

On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:
> ---
>  drivers/input/mouse/alps.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 10e6836..eb4bf31 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -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...

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

* Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470
  2016-05-26  9:05                               ` Pali Rohár
@ 2016-05-26 12:19                                 ` Hans de Goede
  2016-05-26 12:35                                   ` Pali Rohár
  0 siblings, 1 reply; 25+ messages in thread
From: Hans de Goede @ 2016-05-26 12:19 UTC (permalink / raw)
  To: Pali Rohár, Ben Gamari; +Cc: linux-input, Allen Hung, Masaki Ota

Hi,

On 26-05-16 11:05, Pali Rohár wrote:
> On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:
>> ---
>>  drivers/input/mouse/alps.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>> index 10e6836..eb4bf31 100644
>> --- a/drivers/input/mouse/alps.c
>> +++ b/drivers/input/mouse/alps.c
>> @@ -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...

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470
  2016-05-26 12:19                                 ` Hans de Goede
@ 2016-05-26 12:35                                   ` Pali Rohár
  0 siblings, 0 replies; 25+ messages in thread
From: Pali Rohár @ 2016-05-26 12:35 UTC (permalink / raw)
  To: Hans de Goede, Ben Gamari; +Cc: linux-input, Allen Hung, Masaki Ota

On Thursday 26 May 2016 14:19:18 Hans de Goede wrote:
> Hi,
> 
> On 26-05-16 11:05, Pali Rohár wrote:
> >On Thursday 26 May 2016 10:55:14 Ben Gamari wrote:
> >>---
> >> drivers/input/mouse/alps.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >>diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> >>index 10e6836..eb4bf31 100644
> >>--- a/drivers/input/mouse/alps.c
> >>+++ b/drivers/input/mouse/alps.c
> >>@@ -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...
> 
> 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).

-- 
Pali Rohár
pali.rohar@gmail.com
--
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

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

end of thread, other threads:[~2016-05-26 12:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 13:31 Dell Latitude E7470 touchpad status Ben Gamari
     [not found] ` <23E0F704395E694FA4710C833FA087E50D40B8BF13@TPEX7ADC101.APAC.DELL.COM>
2016-05-17  6:03   ` Ben Gamari
2016-05-17  8:23     ` Pali Rohár
2016-05-17  9:50       ` Ben Gamari
2016-05-17 13:16         ` Pali Rohár
2016-05-17 14:46           ` Allen_Hung
2016-05-17 15:22             ` Pali Rohár
2016-05-25  4:38               ` Allen_Hung
2016-05-25  7:39                 ` Pali Rohár
2016-05-25 12:09                   ` Ben Gamari
2016-05-25 14:45                     ` Pali Rohár
2016-05-25 15:19                       ` Hans de Goede
2016-05-25 15:32                         ` Pali Rohár
2016-05-25 12:32                   ` Ben Gamari
2016-05-25 15:43                     ` Pali Rohár
2016-05-25 15:47                       ` Hans de Goede
2016-05-25 15:53                       ` Ben Gamari
2016-05-25 16:01                         ` Packet format for ALPS V8 trackstick (Was: Re: Dell Latitude E7470 touchpad status) Pali Rohár
2016-05-26  8:55                           ` [PATCH] Alps SS4 V2 support for Dell Latitude 7470 Ben Gamari
2016-05-26  8:55                             ` [PATCH 1/3] input/alps: Split up ALPS_BUTTONPAD behavior change Ben Gamari
2016-05-26  8:55                             ` [PATCH 2/3] input/alps: Add touchstick support for V8 protocol devices Ben Gamari
2016-05-26  8:55                             ` [PATCH 3/3] input/alps: Add device description for Dell Latitude E7470 Ben Gamari
2016-05-26  9:05                               ` Pali Rohár
2016-05-26 12:19                                 ` Hans de Goede
2016-05-26 12:35                                   ` Pali Rohár

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.