From patchwork Thu Sep 7 07:05:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juanito X-Patchwork-Id: 9941661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A252602CC for ; Thu, 7 Sep 2017 07:05:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B75F2852D for ; Thu, 7 Sep 2017 07:05:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FFC62852E; Thu, 7 Sep 2017 07:05:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FC6628533 for ; Thu, 7 Sep 2017 07:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753890AbdIGHFS (ORCPT ); Thu, 7 Sep 2017 03:05:18 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54653 "EHLO mout02.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753828AbdIGHFR (ORCPT ); Thu, 7 Sep 2017 03:05:17 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 33B8E208F0 for ; Thu, 7 Sep 2017 09:05:16 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3xns0W37cFzyp0; Thu, 7 Sep 2017 09:05:15 +0200 (CEST) To: linux-input@vger.kernel.org Cc: "masaki.ota@jp.alps.com" From: Juanito Subject: ALPS touchpad ot correctly recognized: GlidePoint vs DualPoint Message-ID: Date: Thu, 7 Sep 2017 09:05:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Dear Kernel Hackers, I hope this is the correct place to post this. If not, please forgive me and feel free to forward it to someplace else. Thank you very much! I have a ThinkPad with a touchpad that looks exactly like this: https://www.camerongray.me/wp-content/uploads/2015/02/SCotlGg.jpg The three pyhsical buttons on top do not work on my debian stretch (4.9). I think it isn't being recognized correctly. I see a "Rejected trackstick packet from non DualPoint device" in my syslog whenever I click on one of them. On the other hand on a Ubuntu 16.04 (4.4 - patched by Ubuntu y guess) the buttons *do* work. Interestingly enough, it doesn't work on 17.04 (4.10). I have noticed that the touchpad gets assigned different names on both distros. On debian it is recognized as a GlidePoint and on Ubuntu as a DualPoint. In an upstream kernel 4.13 which I just built, it's also recognized as a GlidePoint. Unfortunately it doesn't work either. I am not sure if the device is actually a DualPoint or not (I don't really understand the terminology here), but the thing is that the buttons work when the kernel believes it to be one. This is the info I have managed to find about the device while running on the non-working debian: dmesg: [ 2.914806] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input2 lsinput: /dev/input/event11 bustype : BUS_I8042 vendor : 0x2 product : 0x8 version : 1792 name : "AlpsPS/2 ALPS GlidePoint" phys : "isa0060/serio1/input0" bits ev : (null) (null) (null) I have played around with the drivers/input/mouse/alps.c file and found out the following: e7 and ec are important (although I don't know what these are exactly) and have the following values: e7: 73 03 0a ec: 88 b0 13 This combination is recognized as an ALPS touchpad, but isn't assigned the ALPS_DUALPOINT flag. As far as I can see, it is actually being *removed* at this point: if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0) priv->flags &= ~ALPS_DUALPOINT; The bit that says it has a trackpoint (I don't know what this is) is apparently saying my device doesn't have one and is removing the ALPS_DUALPOINT flag. This flag makes the buttons work. I am not sure if it breaks other stuff. I have written a pretty dummy patch which actually adds the flag again making the buttons work. Again, I am not sure if it breaks other stuff but my system isn't whining. Here is the patch: case ALPS_PROTO_V8: After applying this patch dmesg and lsinput say this: [ 8.226543] input: AlpsPS/2 ALPS DualPoint Stick as /devices/platform/i8042/serio1/input/input13 [ 8.247595] input: AlpsPS/2 ALPS DualPoint TouchPad as /devices/platform/i8042/serio1/input/input2 /dev/input/event11 bustype : BUS_I8042 vendor : 0x2 product : 0x8 version : 1792 name : "AlpsPS/2 ALPS DualPoint Stick" phys : "isa0060/serio1/input1" bits ev : (null) (null) (null) /dev/input/event12 bustype : BUS_I8042 vendor : 0x2 product : 0x8 version : 1792 name : "AlpsPS/2 ALPS DualPoint TouchPad" phys : "isa0060/serio1/input0" bits ev : (null) (null) (null) I am a total newbie to kernels and drivers so it would be great if somebody who actually had some idea could take a look at this and probably create a patch in a better place. I'll be glad to post more info if necessary. Thank you very much! Cheers, Juanito --- 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 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 850b00e3ad8e..17aba42e846f 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2804,6 +2804,9 @@ static int alps_set_protocol(struct psmouse *psmouse, if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0) priv->flags &= ~ALPS_DUALPOINT; + if (priv->fw_ver[1] == 0xb0) + priv->flags |= ALPS_DUALPOINT; + break;