From: Hans de Goede <hdegoede@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Santiago Gala" <sgala@apache.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
Date: Mon, 23 Mar 2015 12:39:48 +0100 [thread overview]
Message-ID: <550FFB84.6000609@redhat.com> (raw)
In-Reply-To: <1427031971-13018-1-git-send-email-pali.rohar@gmail.com>
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;
> }
>
>
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Santiago Gala" <sgala@apache.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol
Date: Mon, 23 Mar 2015 12:39:48 +0100 [thread overview]
Message-ID: <550FFB84.6000609@redhat.com> (raw)
In-Reply-To: <1427031971-13018-1-git-send-email-pali.rohar@gmail.com>
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;
> }
>
>
next prev parent reply other threads:[~2015-03-23 11:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-22 13:46 [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol Pali Rohár
2015-03-22 13:46 ` Pali Rohár
2015-03-23 11:39 ` Hans de Goede [this message]
2015-03-23 11:39 ` Hans de Goede
2015-03-23 17:02 ` Pali Rohár
2015-03-24 7:27 ` Hans de Goede
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-03-29 3:59 ` Dmitry Torokhov
2015-05-28 7:39 ` Pali Rohár
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 3:43 ` Dmitry Torokhov
2015-03-28 8:51 ` Pali Rohár
2016-01-05 16:44 ` 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
2016-01-06 23:55 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=550FFB84.6000609@redhat.com \
--to=hdegoede@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=sgala@apache.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.