From patchwork Fri Jun 30 04:28:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 9818405 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 BD07B603F2 for ; Fri, 30 Jun 2017 04:28:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A300828372 for ; Fri, 30 Jun 2017 04:28:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81C8C28573; Fri, 30 Jun 2017 04:28:23 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 5B46128372 for ; Fri, 30 Jun 2017 04:28:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494AbdF3E2V (ORCPT ); Fri, 30 Jun 2017 00:28:21 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:34180 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3E2U (ORCPT ); Fri, 30 Jun 2017 00:28:20 -0400 Received: by mail-wm0-f51.google.com with SMTP id 70so3398284wmo.1 for ; Thu, 29 Jun 2017 21:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=I43JUmd5UusloVhdklofzqiYh+G7+H5NX/D7bALEakk=; b=BqJ182ZAJNvxNY0aEvHlX6kNWdH2slV/Y9OHfLwWyWkWf5cKqjdAvA/xRK81RM5cvq BwMk2evW0xqKvEX7hMPPabOmR2ebPfj3sjIsV9NzwynaLfX3DzjU69CVxf8km3kwL7AK aCm8UNk6RJX4LjtApw05vpy8Chs8RavYlfa7sM6hBQfoYIird3QNmMwzo4BeIw/fy4nH 751ckLgeIspHYn71YLAlmyjY0cPCPEUkvkpdJF3hm0T1uuPO2T+cxWtiaXZ3Knrm5yuz mMsMjI+o/1RXj68u6R5O5+Ylzn2FkiTRCGVbO4q/uEq9OOyg14VEk8+3NENpgE7Nixc4 HNgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=I43JUmd5UusloVhdklofzqiYh+G7+H5NX/D7bALEakk=; b=TojjtGpHD6Z3TuEqXbx+rFaGQjG0IJbf8vi3IJMYF1fyzGg1qsSgBdPMYlGX9SIQ/6 j37e1mkYP7Iq2+qRt71OPZ4H1KgFjgpDRaazvUEULkdjDjPQx/QP83rDRL6wJsnslt1h vOypOnp/ilLz+hyCXhsdoQ4OSjzmN3vpsbLufu83ywNMW7i9MVl6Mib3SeexAmMXTSgH dOQsFXRyfI+swjkiTA8Pv+rOCn4bR5t1XKk+KiaW+pEcH1MeGWS4aTEwGK0WZNTYaEJY noLEi5S6Upw0n02tCMlqIsi4YL4p9bvoEcbq+FL1GMbP7tlDZ+1BGfWXupnf5EVi6zvr JOEg== X-Gm-Message-State: AKS2vOzDsiMbTRsKyrVa6UOsPDoDbHzLRsa/59nwEQHq06DnHSQd6wqw ZCRQQmUTir//EpFBCgedgTDKHGC+6Bq+llk= X-Received: by 10.28.216.21 with SMTP id p21mr4312987wmg.29.1498796899226; Thu, 29 Jun 2017 21:28:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.149.209 with HTTP; Thu, 29 Jun 2017 21:28:18 -0700 (PDT) From: Kai-Heng Feng Date: Fri, 30 Jun 2017 12:28:18 +0800 Message-ID: Subject: No multitouch on USB keyboard/touchpad composite device To: linux-input@vger.kernel.org, robgonorl@gmail.com 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 Hi, A user has a laptop with composite keyboard/touchpad. The touchpad does not have multitouch ability [1], since it's being recognizes as a usb-generic device. Currently I can only find hid-rmi has similar composite abilities, not much else for other devices. [ 3.683550] hid-generic 0003:04F3:0400.0002: input,hiddev0,hidraw0: USB HID v1.10 Keyboard [ITE Tech. Inc. ITE Device(8910)] on usb-0000:00:14.0-3.1/input0 [ 3.683846] input: ITE Tech. Inc. ITE Device(8910) as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.1/0003:04F3:0400.0003/input/input7 [ 3.684027] hid-generic 0003:04F3:0400.0003: input,hidraw1: USB HID v1.10 Mouse [ITE Tech. Inc. ITE Device(8910)] on usb-0000:00:14.0-3.1/input1 I tried to make the touchpad (0003:04F3:0400.0003) uses hid-multitouch, but the touchpad doesn't work this way. Also, the keyboard (0003:04F3:0400.0002) loses its functionality because it uses hid-multitouch. So here are my questions: - How to load different driver for different USB interfaces - The best way to remote debug input devices - How to make the touchpad work [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1400463 Here's the diff I use to make it load hid-multitouch (which doesn't work): Thanks. --- 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/hid/hid-core.c b/drivers/hid/hid-core.c index 6e040692f1d8..ee3cb86fb4ca 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2091,6 +2091,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) }, #endif #if IS_ENABLED(CONFIG_HID_MULTITOUCH) + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, 0x0400) }, { HID_USB_DEVICE(USB_VENDOR_ID_LG, USB_DEVICE_ID_LG_MELFAS_MT) }, #endif #if IS_ENABLED(CONFIG_HID_WIIMOTE) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 24d5b6deb571..1891d604b3b7 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -161,6 +161,7 @@ static void mt_post_parse(struct mt_device *td); #define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0x0109 #define MT_CLS_LG 0x010a #define MT_CLS_VTL 0x0110 +#define MT_CLS_ELAN 0x0111 #define MT_DEFAULT_MAXCONTACT 10 #define MT_MAX_MAXCONTACT 250 @@ -278,6 +279,8 @@ static struct mt_class mt_classes[] = { MT_QUIRK_CONTACT_CNT_ACCURATE | MT_QUIRK_FORCE_GET_FEATURE, }, + { .name = MT_CLS_ELAN, + .quirks = MT_QUIRK_ALWAYS_VALID }, { } }; @@ -1569,6 +1572,9 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR2) }, + { .driver_data = MT_CLS_ELAN, + MT_USB_DEVICE(USB_VENDOR_ID_ELAN, 0x0400) }, + /* Generic MT device */ { HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH, HID_ANY_ID, HID_ANY_ID) },