From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbcAEQo2 (ORCPT ); Tue, 5 Jan 2016 11:44:28 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:33264 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbcAEQoY (ORCPT ); Tue, 5 Jan 2016 11:44:24 -0500 Date: Tue, 5 Jan 2016 17:44:21 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Hans de Goede , Dmitry Torokhov , Santiago Gala Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Hung Subject: Re: [PATCH] Input: ALPS - Detect trackstick presence for v7 protocol Message-ID: <20160105164421.GP22661@pali> References: <1427031971-13018-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1427031971-13018-1-git-send-email-pali.rohar@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- 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 > 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