From patchwork Sat Jun 18 19:19:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 9185803 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 A4006607FD for ; Sat, 18 Jun 2016 19:19:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76FEA27DCE for ; Sat, 18 Jun 2016 19:19:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56CF228362; Sat, 18 Jun 2016 19:19: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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI, UPPERCASE_50_75 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 C2F5F27DCE for ; Sat, 18 Jun 2016 19:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750883AbcFRTTU (ORCPT ); Sat, 18 Jun 2016 15:19:20 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33930 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813AbcFRTTU (ORCPT ); Sat, 18 Jun 2016 15:19:20 -0400 Received: by mail-oi0-f65.google.com with SMTP id a64so19148426oii.1 for ; Sat, 18 Jun 2016 12:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:mime-version; bh=qH89IFy+5HKV+vnw6M+dpFQt7ig/L3iTce42TlACbQ4=; b=JKcyBNTmQDnb38hPMgs9Q/tdSMIXVkM32iwhdeaNdbtNmdEpgq1hATk4BOqQ4txHQx 40uAUSzx8h3wU96p8rsEV8PXbBjCmJ59TXPxOg+DMon15YLAG69nihjTrbNBzpcGWbi0 AyK9M5m6eO5GCOUvexySquaYHf52ySzVqhK5jvLkr7r/eaMxsa10YJmV4cSHh9pyynbH 012qckdR8qxUXJb1CX2ZfG4w/9/Exo5JZmj8kM4tAY2O20/Yjn5D7iwgvPqjYdiBCzXX 6PlaQM5DjdtbabNvjlMzQZBl4JcDAvYf+BMtICTUhsXP0ebAhOlve+Mmpig1ZRhoVUT2 yxDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version; bh=qH89IFy+5HKV+vnw6M+dpFQt7ig/L3iTce42TlACbQ4=; b=WSD5hd63i/Fjr6tRIEOWLdqRezB8eUAHCWjgQRlQScsn9YuDi7FF3eVXlB9nf0JKLB t3RiFyll6GuR0B0Q8S+JhGRsbWmrYQZpWWbfx4ii30vbdajRMfEL3ByeP3VxIYdmbYjj xeS68w6NsaBTXdut8FWo8kmky/Lc/Zp46cpHUh6wOGqks2FVYnTVyotiUYJ/zZMEdOc3 zUnHwQdug6BYqQqdQ7eZO+Bn9udkq8BNgrCp6ixrCnSCQk/UN4aurJxlBofZf/60fP3Z hLPU5wndrHu1qMvfAk6bg5lFa1MqNb2Fj44aARnP6YUh1iPDz152y3GAAlrJ7N7knB87 N1rw== X-Gm-Message-State: ALyK8tLJJfPJ3aSvu/NDNqbmaO/VWZ7wsM53G95LgXdKdY7sIjcNo7oDq+AeVAw+7ER00Q== X-Received: by 10.202.80.85 with SMTP id e82mr3934762oib.47.1466277558937; Sat, 18 Jun 2016 12:19:18 -0700 (PDT) Received: from linux-2653 (ip68-5-234-151.oc.oc.cox.net. [68.5.234.151]) by smtp.googlemail.com with ESMTPSA id h94sm4112194oth.21.2016.06.18.12.19.17 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 18 Jun 2016 12:19:18 -0700 (PDT) Message-ID: <1466277551.2669.13.camel@gmail.com> Subject: [PATCH v2] HID: multitouch: add support for Type Cover Pro 3 From: Dennis Chen To: Benjamin Tissoires , Jiri Kosina Cc: linux-input Date: Sat, 18 Jun 2016 12:19:11 -0700 X-Mailer: Evolution 3.18.5.2 (3.18.5.2-1.fc23) Mime-Version: 1.0 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 Include Microsoft Type Cover 3 support into hid-multitouch.c Allow touchpad device to have multitouch functionality. Drop Type Cover 3 support in hid-microsoft.c Signed-off-by: Dennis Chen ---  drivers/hid/Kconfig          |  1 +  drivers/hid/hid-core.c       | 10 +---------  drivers/hid/hid-microsoft.c  |  8 --------  drivers/hid/hid-multitouch.c | 14 ++++++++++++++  4 files changed, 16 insertions(+), 17 deletions(-) --  2.5.5 diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 5646ca4..5af0603 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -530,6 +530,7 @@ config HID_MULTITOUCH     - IrTouch Infrared USB panels     - LG Display panels (Dell ST2220Tc)     - Lumio CrystalTouch panels +   - Microsoft Type Cover 3 touchpad     - MosArt dual-touch panels     - Panasonic multitouch panels     - PenMount dual touch panels diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8ea3a26..ddeadd9 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -724,11 +724,7 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)   hid->group = HID_GROUP_SENSOR_HUB;     if (hid->vendor == USB_VENDOR_ID_MICROSOFT && -     (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 || -      hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 || -      hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP || -      hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 || -      hid->product == USB_DEVICE_ID_MS_POWER_COVER) && +     hid->product == USB_DEVICE_ID_MS_POWER_COVER &&       hid->group == HID_GROUP_MULTITOUCH)   hid->group = HID_GROUP_GENERIC;   @@ -1973,10 +1969,6 @@ static const struct hid_device_id hid_have_special_driver[] = {   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) }, diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c index e924d55..b88a429 100644 --- a/drivers/hid/hid-microsoft.c +++ b/drivers/hid/hid-microsoft.c @@ -282,14 +282,6 @@ static const struct hid_device_id ms_devices[] = {   .driver_data = MS_NOGET },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),   .driver_data = MS_DUPLICATE_USAGES }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3), - .driver_data = MS_HIDINPUT }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2), - .driver_data = MS_HIDINPUT }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP), - .driver_data = MS_HIDINPUT }, - { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), - .driver_data = MS_HIDINPUT },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER),   .driver_data = MS_HIDINPUT },   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD), diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 95b7d61..1bf002f 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -1377,6 +1377,20 @@ static const struct hid_device_id mt_devices[] = {   MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,   USB_DEVICE_ID_ILITEK_MULTITOUCH) },   + /* Microsoft Type Cover 3 touchpad */ + { .driver_data = MT_CLS_EXPORT_ALL_INPUTS, + MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, + USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) }, + { .driver_data = MT_CLS_EXPORT_ALL_INPUTS, + MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, + USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) }, + { .driver_data = MT_CLS_EXPORT_ALL_INPUTS, + MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, + USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, + { .driver_data = MT_CLS_EXPORT_ALL_INPUTS, + MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, + USB_DEVICE_ID_MS_TYPE_COVER_3) }, +   /* MosArt panels */   { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,   MT_USB_DEVICE(USB_VENDOR_ID_ASUS,