* [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
@ 2015-03-22 13:46 Pali Rohár
2015-03-23 11:39 ` Hans de Goede
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Pali Rohár @ 2015-03-22 13:46 UTC (permalink / raw)
To: Hans de Goede, Dmitry Torokhov, Santiago Gala
Cc: linux-input, linux-kernel, Pali Rohár
This patch adds detection of trackstick for v7 protocol devices. Code in this
patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550
Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.
Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
trackstick and kernel reports to userspace also redundant trackstick device.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
drivers/input/mouse/alps.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 33198b9..c9cd27a 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -30,6 +30,7 @@
#define ALPS_CMD_NIBBLE_10 0x01f2
#define ALPS_REG_BASE_RUSHMORE 0xc2c0
+#define ALPS_REG_BASE_V7 0xc2c0
#define ALPS_REG_BASE_PINNACLE 0x0000
static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
@@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
return 0;
}
-static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
+static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
{
int ret = -EIO, reg_val;
@@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
int reg_val;
unsigned char param[4];
- reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
+ reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
if (reg_val == -EIO)
goto error;
@@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
priv->x_bits = 16;
priv->y_bits = 12;
- if (alps_probe_trackstick_v3(psmouse,
- ALPS_REG_BASE_RUSHMORE) < 0)
+ if (alps_probe_trackstick_v3_v7(psmouse,
+ ALPS_REG_BASE_RUSHMORE) < 0)
priv->flags &= ~ALPS_DUALPOINT;
break;
@@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
if (priv->fw_ver[1] != 0xba)
priv->flags |= ALPS_BUTTONPAD;
+ if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
+ priv->flags &= ~ALPS_DUALPOINT;
+
break;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-22 13:46 [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol Pali Rohár
@ 2015-03-23 11:39 ` Hans de Goede
2015-03-23 17:02 ` Pali Rohár
[not found] ` <201503271816.11723@pali>
2016-01-05 16:44 ` Pali Rohár
2 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2015-03-23 11:39 UTC (permalink / raw)
To: Pali Rohár, Dmitry Torokhov, Santiago Gala; +Cc: linux-input, linux-kernel
Hi,
On 22-03-15 14:46, Pali Rohár wrote:
> This patch adds detection of trackstick for v7 protocol devices. Code in this
> patch is used in official Dell touchpad linux drivers for Dell models:
> Dell Latitude E5250/5250, E5450/5450, E5550/5550
>
> Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.
>
> Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
> trackstick and kernel reports to userspace also redundant trackstick device.
>
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Looks good, but has this been tested on a laptop which actually has a v7 pad +
trackstick? I would like to see this actually tested on at least one such
laptop before it gets merged.
Regards,
Hans
> ---
> drivers/input/mouse/alps.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 33198b9..c9cd27a 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -30,6 +30,7 @@
> #define ALPS_CMD_NIBBLE_10 0x01f2
>
> #define ALPS_REG_BASE_RUSHMORE 0xc2c0
> +#define ALPS_REG_BASE_V7 0xc2c0
> #define ALPS_REG_BASE_PINNACLE 0x0000
>
> static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
> @@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
> return 0;
> }
>
> -static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
> +static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
> {
> int ret = -EIO, reg_val;
>
> @@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
> int reg_val;
> unsigned char param[4];
>
> - reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
> + reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
> if (reg_val == -EIO)
> goto error;
>
> @@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
> priv->x_bits = 16;
> priv->y_bits = 12;
>
> - if (alps_probe_trackstick_v3(psmouse,
> - ALPS_REG_BASE_RUSHMORE) < 0)
> + if (alps_probe_trackstick_v3_v7(psmouse,
> + ALPS_REG_BASE_RUSHMORE) < 0)
> priv->flags &= ~ALPS_DUALPOINT;
>
> break;
> @@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
> if (priv->fw_ver[1] != 0xba)
> priv->flags |= ALPS_BUTTONPAD;
>
> + if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
> + priv->flags &= ~ALPS_DUALPOINT;
> +
> break;
> }
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-23 11:39 ` Hans de Goede
@ 2015-03-23 17:02 ` Pali Rohár
2015-03-24 7:27 ` Hans de Goede
0 siblings, 1 reply; 15+ messages in thread
From: Pali Rohár @ 2015-03-23 17:02 UTC (permalink / raw)
To: Hans de Goede; +Cc: Dmitry Torokhov, Santiago Gala, linux-input, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 1309 bytes --]
On Monday 23 March 2015 12:39:48 Hans de Goede wrote:
> Hi,
>
> On 22-03-15 14:46, Pali Rohár wrote:
> > This patch adds detection of trackstick for v7 protocol
> > devices. Code in this patch is used in official Dell
> > touchpad linux drivers for Dell models: Dell Latitude
> > E5250/5250, E5450/5450, E5550/5550
> >
> > Detection code and base reg for alps v3 rushmore and v7
> > devices is exacly same.
> >
> > Also user in bug
> > https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> > that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad
> > device without trackstick and kernel reports to userspace
> > also redundant trackstick device.
> >
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
>
> Looks good, but has this been tested on a laptop which
> actually has a v7 pad + trackstick? I would like to see this
> actually tested on at least one such laptop before it gets
> merged.
>
> Regards,
>
> Hans
>
I did not tested my patch on any v7 touchpad-only laptop.
But I guess Dell should have tested it... Of course we can wait
until somebody test this patch and after that we will merge it.
@Santiago: Can you test this patch? You also have v7 touchpad
only laptop (without trackstick).
--
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] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-23 17:02 ` Pali Rohár
@ 2015-03-24 7:27 ` Hans de Goede
[not found] ` <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>
2015-03-29 3:59 ` Dmitry Torokhov
0 siblings, 2 replies; 15+ messages in thread
From: Hans de Goede @ 2015-03-24 7:27 UTC (permalink / raw)
To: Pali Rohár; +Cc: Dmitry Torokhov, Santiago Gala, linux-input, linux-kernel
Hi,
On 23-03-15 18:02, Pali Rohár wrote:
> On Monday 23 March 2015 12:39:48 Hans de Goede wrote:
>> Hi,
>>
>> On 22-03-15 14:46, Pali Rohár wrote:
>>> This patch adds detection of trackstick for v7 protocol
>>> devices. Code in this patch is used in official Dell
>>> touchpad linux drivers for Dell models: Dell Latitude
>>> E5250/5250, E5450/5450, E5550/5550
>>>
>>> Detection code and base reg for alps v3 rushmore and v7
>>> devices is exacly same.
>>>
>>> Also user in bug
>>> https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
>>> that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad
>>> device without trackstick and kernel reports to userspace
>>> also redundant trackstick device.
>>>
>>> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
>>
>> Looks good, but has this been tested on a laptop which
>> actually has a v7 pad + trackstick? I would like to see this
>> actually tested on at least one such laptop before it gets
>> merged.
>>
>> Regards,
>>
>> Hans
>>
>
> I did not tested my patch on any v7 touchpad-only laptop.
Ah, but I'm not worried about testing on a touchpad-only laptop,
we are already reporting a trackpoint there even though there
is none. I'm worried about breaking existing v7 using laptops
which actually have a trackstick.
So if this is tested on a v7 laptop with trackstick, and it
does not break the trackstick then that is good enough for me.
Regards,
Hans
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>]
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
[not found] ` <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>
@ 2015-03-24 16:46 ` Pali Rohár
2015-03-24 17:01 ` Dmitry Torokhov
1 sibling, 0 replies; 15+ messages in thread
From: Pali Rohár @ 2015-03-24 16:46 UTC (permalink / raw)
To: Santiago Gala; +Cc: Hans de Goede, Dmitry Torokhov, linux-input, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 2435 bytes --]
Hello, I can compile psmouse.ko module for you. Just let me know
which ubuntu kernel (and from) are you using.
On Tuesday 24 March 2015 11:25:13 Santiago Gala wrote:
> I can't compile the kernel in this laptop, sorry, I tried but
> couln't complete: it requires too much free disk (more than
> 9GB) and the SSD is very small.
>
> If there is a way (I have not found it even though I know that
> dkms exists) to just compile the modjule I could easily test
> the patch with the mainline ubuntu binary of the relevant
> 4.0.0-rcN, but spending some time trying it didn't show how
> to do i
>
> Regards
> Santiago
>
> El mar., 24 de marzo de 2015 a las 8:30, Hans de Goede
> (<hdegoede@redhat.com>)
>
> escribió:
> > Hi,
> >
> > On 23-03-15 18:02, Pali Rohár wrote:
> > > On Monday 23 March 2015 12:39:48 Hans de Goede wrote:
> > >> Hi,
> > >>
> > >> On 22-03-15 14:46, Pali Rohár wrote:
> > >>> This patch adds detection of trackstick for v7 protocol
> > >>> devices. Code in this patch is used in official Dell
> > >>> touchpad linux drivers for Dell models: Dell Latitude
> > >>> E5250/5250, E5450/5450, E5550/5550
> > >>>
> > >>> Detection code and base reg for alps v3 rushmore and v7
> > >>> devices is exacly same.
> > >>>
> > >>> Also user in bug
> > >>> https://bugzilla.kernel.org/show_bug.cgi?id=94801
> > >>> reported that Toshiba Sattellite Z30-A-1DG has only
> > >>> alps v7 touchpad device without trackstick and kernel
> > >>> reports to userspace also redundant trackstick device.
> > >>>
> > >>> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > >>
> > >> Looks good, but has this been tested on a laptop which
> > >> actually has a v7 pad + trackstick? I would like to see
> > >> this actually tested on at least one such laptop before
> > >> it gets merged.
> > >>
> > >> Regards,
> > >>
> > >> Hans
> > >
> > > I did not tested my patch on any v7 touchpad-only laptop.
> >
> > Ah, but I'm not worried about testing on a touchpad-only
> > laptop, we are already reporting a trackpoint there even
> > though there is none. I'm worried about breaking existing
> > v7 using laptops which actually have a trackstick.
> >
> > So if this is tested on a v7 laptop with trackstick, and it
> > does not break the trackstick then that is good enough for
> > me.
> >
> > Regards,
> >
> > Hans
--
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] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
[not found] ` <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>
2015-03-24 16:46 ` Pali Rohár
@ 2015-03-24 17:01 ` Dmitry Torokhov
1 sibling, 0 replies; 15+ messages in thread
From: Dmitry Torokhov @ 2015-03-24 17:01 UTC (permalink / raw)
To: Santiago Gala; +Cc: Hans de Goede, Pali Rohár, linux-input, linux-kernel
On Tue, Mar 24, 2015 at 10:25:13AM +0000, Santiago Gala wrote:
> I can't compile the kernel in this laptop, sorry, I tried but couln't
> complete: it requires too much free disk (more than 9GB) and the SSD is
> very small.
>
> If there is a way (I have not found it even though I know that dkms exists)
> to just compile the modjule I could easily test the patch with the mainline
> ubuntu binary of the relevant 4.0.0-rcN, but spending some time trying it
> didn't show how to do i
If you have another more powerful box you can always compile the kernel
there and then use "sshfs -o allow_others local_dir
remote_box:kernel/build/dir/" to mount the build directory on the target
box and do "cd local_dir; sudo make modules_install install" to install
the kernel.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-24 7:27 ` Hans de Goede
[not found] ` <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>
@ 2015-03-29 3:59 ` Dmitry Torokhov
2015-05-28 7:39 ` Pali Rohár
1 sibling, 1 reply; 15+ messages in thread
From: Dmitry Torokhov @ 2015-03-29 3:59 UTC (permalink / raw)
To: Hans de Goede
Cc: Pali Rohár, Santiago Gala, linux-input, linux-kernel,
Masaki Ota
On Tue, Mar 24, 2015 at 08:27:29AM +0100, Hans de Goede wrote:
> Hi,
>
> On 23-03-15 18:02, Pali Rohár wrote:
> >On Monday 23 March 2015 12:39:48 Hans de Goede wrote:
> >>Hi,
> >>
> >>On 22-03-15 14:46, Pali Rohár wrote:
> >>>This patch adds detection of trackstick for v7 protocol
> >>>devices. Code in this patch is used in official Dell
> >>>touchpad linux drivers for Dell models: Dell Latitude
> >>>E5250/5250, E5450/5450, E5550/5550
> >>>
> >>>Detection code and base reg for alps v3 rushmore and v7
> >>>devices is exacly same.
> >>>
> >>>Also user in bug
> >>>https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> >>>that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad
> >>>device without trackstick and kernel reports to userspace
> >>>also redundant trackstick device.
> >>>
> >>>Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> >>
> >>Looks good, but has this been tested on a laptop which
> >>actually has a v7 pad + trackstick? I would like to see this
> >>actually tested on at least one such laptop before it gets
> >>merged.
> >>
> >>Regards,
> >>
> >>Hans
> >>
> >
> >I did not tested my patch on any v7 touchpad-only laptop.
>
> Ah, but I'm not worried about testing on a touchpad-only laptop,
> we are already reporting a trackpoint there even though there
> is none. I'm worried about breaking existing v7 using laptops
> which actually have a trackstick.
>
> So if this is tested on a v7 laptop with trackstick, and it
> does not break the trackstick then that is good enough for me.
I wonder if Masaki might have devices with V7 and trackstick available
and could test the patch for us?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-29 3:59 ` Dmitry Torokhov
@ 2015-05-28 7:39 ` Pali Rohár
0 siblings, 0 replies; 15+ messages in thread
From: Pali Rohár @ 2015-05-28 7:39 UTC (permalink / raw)
To: Masaki Ota
Cc: Hans de Goede, Santiago Gala, linux-input, linux-kernel,
Dmitry Torokhov
On Saturday 28 March 2015 20:59:35 Dmitry Torokhov wrote:
> On Tue, Mar 24, 2015 at 08:27:29AM +0100, Hans de Goede wrote:
> > Hi,
> >
> > On 23-03-15 18:02, Pali Rohár wrote:
> > >On Monday 23 March 2015 12:39:48 Hans de Goede wrote:
> > >>Hi,
> > >>
> > >>On 22-03-15 14:46, Pali Rohár wrote:
> > >>>This patch adds detection of trackstick for v7 protocol
> > >>>devices. Code in this patch is used in official Dell
> > >>>touchpad linux drivers for Dell models: Dell Latitude
> > >>>E5250/5250, E5450/5450, E5550/5550
> > >>>
> > >>>Detection code and base reg for alps v3 rushmore and v7
> > >>>devices is exacly same.
> > >>>
> > >>>Also user in bug
> > >>>https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> > >>>that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad
> > >>>device without trackstick and kernel reports to userspace
> > >>>also redundant trackstick device.
> > >>>
> > >>>Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > >>
> > >>Looks good, but has this been tested on a laptop which
> > >>actually has a v7 pad + trackstick? I would like to see this
> > >>actually tested on at least one such laptop before it gets
> > >>merged.
> > >>
> > >>Regards,
> > >>
> > >>Hans
> > >>
> > >
> > >I did not tested my patch on any v7 touchpad-only laptop.
> >
> > Ah, but I'm not worried about testing on a touchpad-only laptop,
> > we are already reporting a trackpoint there even though there
> > is none. I'm worried about breaking existing v7 using laptops
> > which actually have a trackstick.
> >
> > So if this is tested on a v7 laptop with trackstick, and it
> > does not break the trackstick then that is good enough for me.
>
> I wonder if Masaki might have devices with V7 and trackstick available
> and could test the patch for us?
>
> Thanks.
>
Masaki ping, do you have any V7 device with trackstick for testing?
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <201503271816.11723@pali>]
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2015-03-22 13:46 [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol Pali Rohár
2015-03-23 11:39 ` Hans de Goede
[not found] ` <201503271816.11723@pali>
@ 2016-01-05 16:44 ` Pali Rohár
2016-01-06 8:12 ` Hans de Goede
2 siblings, 1 reply; 15+ messages in thread
From: Pali Rohár @ 2016-01-05 16:44 UTC (permalink / raw)
To: Hans de Goede, Dmitry Torokhov, Santiago Gala
Cc: linux-input, linux-kernel, Alex Hung
On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:
> This patch adds detection of trackstick for v7 protocol devices. Code in this
> patch is used in official Dell touchpad linux drivers for Dell models:
> Dell Latitude E5250/5250, E5450/5450, E5550/5550
>
> Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.
>
> Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
> trackstick and kernel reports to userspace also redundant trackstick device.
>
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
Hello!
Alex now tested this patch on two Dell machines with ALPS: E5450 (with
TrackStick) and E5250 (without TrackStick).
With patch nothing was changed for E5450. And E5250 with patch does not
show trackstick input device anymore.
Tested-by: Alex Hung <alex.hung@canonical.com>
> drivers/input/mouse/alps.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 33198b9..c9cd27a 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -30,6 +30,7 @@
> #define ALPS_CMD_NIBBLE_10 0x01f2
>
> #define ALPS_REG_BASE_RUSHMORE 0xc2c0
> +#define ALPS_REG_BASE_V7 0xc2c0
> #define ALPS_REG_BASE_PINNACLE 0x0000
>
> static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
> @@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
> return 0;
> }
>
> -static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
> +static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
> {
> int ret = -EIO, reg_val;
>
> @@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
> int reg_val;
> unsigned char param[4];
>
> - reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
> + reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
> if (reg_val == -EIO)
> goto error;
>
> @@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
> priv->x_bits = 16;
> priv->y_bits = 12;
>
> - if (alps_probe_trackstick_v3(psmouse,
> - ALPS_REG_BASE_RUSHMORE) < 0)
> + if (alps_probe_trackstick_v3_v7(psmouse,
> + ALPS_REG_BASE_RUSHMORE) < 0)
> priv->flags &= ~ALPS_DUALPOINT;
>
> break;
> @@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
> if (priv->fw_ver[1] != 0xba)
> priv->flags |= ALPS_BUTTONPAD;
>
> + if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
> + priv->flags &= ~ALPS_DUALPOINT;
> +
> break;
> }
>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2016-01-05 16:44 ` Pali Rohár
@ 2016-01-06 8:12 ` Hans de Goede
2016-01-06 23:55 ` Dmitry Torokhov
0 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2016-01-06 8:12 UTC (permalink / raw)
To: Pali Rohár, Dmitry Torokhov, Santiago Gala
Cc: linux-input, linux-kernel, Alex Hung
Hi,
On 05-01-16 17:44, Pali Rohár wrote:
> On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:
>> This patch adds detection of trackstick for v7 protocol devices. Code in this
>> patch is used in official Dell touchpad linux drivers for Dell models:
>> Dell Latitude E5250/5250, E5450/5450, E5550/5550
>>
>> Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.
>>
>> Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
>> that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
>> trackstick and kernel reports to userspace also redundant trackstick device.
>>
>> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
>> ---
>
> Hello!
>
> Alex now tested this patch on two Dell machines with ALPS: E5450 (with
> TrackStick) and E5250 (without TrackStick).
>
> With patch nothing was changed for E5450. And E5250 with patch does not
> show trackstick input device anymore.
>
> Tested-by: Alex Hung <alex.hung@canonical.com>
With that this patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Pali, it is probably a good idea to send Dmitry a v2 of these 2
patches rebased on top of the latest next and with Alex' Tested-By
and my Reviewed-by-s added.
Regards,
Hans
>
>> drivers/input/mouse/alps.c | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>> index 33198b9..c9cd27a 100644
>> --- a/drivers/input/mouse/alps.c
>> +++ b/drivers/input/mouse/alps.c
>> @@ -30,6 +30,7 @@
>> #define ALPS_CMD_NIBBLE_10 0x01f2
>>
>> #define ALPS_REG_BASE_RUSHMORE 0xc2c0
>> +#define ALPS_REG_BASE_V7 0xc2c0
>> #define ALPS_REG_BASE_PINNACLE 0x0000
>>
>> static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
>> @@ -1795,7 +1796,7 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse)
>> return 0;
>> }
>>
>> -static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base)
>> +static int alps_probe_trackstick_v3_v7(struct psmouse *psmouse, int reg_base)
>> {
>> int ret = -EIO, reg_val;
>>
>> @@ -1880,7 +1881,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse)
>> int reg_val;
>> unsigned char param[4];
>>
>> - reg_val = alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE);
>> + reg_val = alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_PINNACLE);
>> if (reg_val == -EIO)
>> goto error;
>>
>> @@ -2260,8 +2261,8 @@ static int alps_set_protocol(struct psmouse *psmouse,
>> priv->x_bits = 16;
>> priv->y_bits = 12;
>>
>> - if (alps_probe_trackstick_v3(psmouse,
>> - ALPS_REG_BASE_RUSHMORE) < 0)
>> + if (alps_probe_trackstick_v3_v7(psmouse,
>> + ALPS_REG_BASE_RUSHMORE) < 0)
>> priv->flags &= ~ALPS_DUALPOINT;
>>
>> break;
>> @@ -2311,6 +2312,9 @@ static int alps_set_protocol(struct psmouse *psmouse,
>> if (priv->fw_ver[1] != 0xba)
>> priv->flags |= ALPS_BUTTONPAD;
>>
>> + if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0)
>> + priv->flags &= ~ALPS_DUALPOINT;
>> +
>> break;
>> }
>>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
2016-01-06 8:12 ` Hans de Goede
@ 2016-01-06 23:55 ` Dmitry Torokhov
0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Torokhov @ 2016-01-06 23:55 UTC (permalink / raw)
To: Hans de Goede
Cc: Pali Rohár, Santiago Gala, linux-input, linux-kernel,
Alex Hung
On Wed, Jan 06, 2016 at 09:12:30AM +0100, Hans de Goede wrote:
> Hi,
>
> On 05-01-16 17:44, Pali Rohár wrote:
> >On Sunday 22 March 2015 14:46:11 Pali Rohár wrote:
> >>This patch adds detection of trackstick for v7 protocol devices. Code in this
> >>patch is used in official Dell touchpad linux drivers for Dell models:
> >>Dell Latitude E5250/5250, E5450/5450, E5550/5550
> >>
> >>Detection code and base reg for alps v3 rushmore and v7 devices is exacly same.
> >>
> >>Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
> >>that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
> >>trackstick and kernel reports to userspace also redundant trackstick device.
> >>
> >>Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> >>---
> >
> >Hello!
> >
> >Alex now tested this patch on two Dell machines with ALPS: E5450 (with
> >TrackStick) and E5250 (without TrackStick).
> >
> >With patch nothing was changed for E5450. And E5250 with patch does not
> >show trackstick input device anymore.
> >
> >Tested-by: Alex Hung <alex.hung@canonical.com>
>
> With that this patch looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
> Pali, it is probably a good idea to send Dmitry a v2 of these 2
> patches rebased on top of the latest next and with Alex' Tested-By
> and my Reviewed-by-s added.
It's alright, I added the tags and applied.
--
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-01-06 23:55 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-22 13:46 [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol Pali Rohár
2015-03-23 11:39 ` Hans de Goede
2015-03-23 17:02 ` Pali Rohár
2015-03-24 7:27 ` Hans de Goede
[not found] ` <CAPXTYCXrvFDbvEDkEQxkcJ5y1OHx7Ldm+bu-LnWfigjTj6gECw@mail.gmail.com>
2015-03-24 16:46 ` Pali Rohár
2015-03-24 17:01 ` Dmitry Torokhov
2015-03-29 3:59 ` Dmitry Torokhov
2015-05-28 7:39 ` Pali Rohár
[not found] ` <201503271816.11723@pali>
[not found] ` <CAPXTYCX13Y7FY7o9CPPQXchSVYiJ415o_yxOFruO-scTV=X27w@mail.gmail.com>
2015-03-27 20:08 ` Pali Rohár
[not found] ` <CAPXTYCVGpm27naqu723f8kC0h75TT6XSN0X_EWCu6cXJS0G2kg@mail.gmail.com>
2015-03-27 20:54 ` Pali Rohár
[not found] ` <CAPXTYCUqibXqTBf8VKGKixKeM49LhucxFDhS+04fUsiSEKMKOg@mail.gmail.com>
2015-03-28 3:43 ` Dmitry Torokhov
2015-03-28 8:51 ` Pali Rohár
2016-01-05 16:44 ` Pali Rohár
2016-01-06 8:12 ` Hans de Goede
2016-01-06 23:55 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).