From patchwork Mon Sep 4 19:40:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Bishop X-Patchwork-Id: 9937513 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 95385601EB for ; Mon, 4 Sep 2017 19:41:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8523A287D5 for ; Mon, 4 Sep 2017 19:41:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79C7C287EF; Mon, 4 Sep 2017 19:41:01 +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 5205B287D5 for ; Mon, 4 Sep 2017 19:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753969AbdIDTk5 (ORCPT ); Mon, 4 Sep 2017 15:40:57 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:36991 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbdIDTk4 (ORCPT ); Mon, 4 Sep 2017 15:40:56 -0400 Received: by mail-qt0-f195.google.com with SMTP id h21so885146qth.4 for ; Mon, 04 Sep 2017 12:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neverware.com; s=google; h=from:to:cc:subject:date:message-id; bh=fLwYZ49IAhbvWGWofZbHX/uQ9nnr028tN/ZefTqH6F8=; b=chYujFUuyaDVbKf0NgI0E4YbDIuEj3LZv0RFzrDuotdE4jIGZZIj6EyVcBv5hsxq3G QKvYbk8snCvXLVnxksnA6vk8pIPRxEmDBwkxtzQ7+gBlE0GMumrGRYB+V8C0Zeww3MLz upjscVNvW35WfkDl/Da4gk6Cn8kWDZ+SUeoLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fLwYZ49IAhbvWGWofZbHX/uQ9nnr028tN/ZefTqH6F8=; b=eLB9PzsxR9gKE9lY3gruGVhjgmZcSgMR+7Zeq/8cbsKrBV4jCZl/AJlj2Z6ARIfgzi 3jaLaH+bVjws+GyMpCSBQ7/58zteYie7eWeaju3N/XAkUPsBN0GNKipiNUK91BMJE7Uv myIOVbB3SJCghQ5m+bvA8scV6Grr5Y+MQT4XBymh3Qo9skMMa1iTb4J+fadp3fuOEWdc iwr4uGzBSK7vkUi9UhIOZF4VaoiU5gQdc2Ttu7NSy2qyd+hos8YwIU7zRnhOh+E9+CvO zb/QNle5xXsnSA9BOB/rpNdphsgvrZWE6Cmc5hbFy6WTIk8NY0iHCnXNc23fUTbqcdHP vmOA== X-Gm-Message-State: AHPjjUhatRekKth+99gnRyT+Opv/HkiOsQzQlLhlQINvuK8/+1K0pSd/ Hvxrs0blD5YnWqGI X-Google-Smtp-Source: ADKCNb79a9jvWRKkWz+jTiny9hwM2s2te1AoWq87RP/hSg77VgF+Iutd6YYzwK9AVcG0eBj6G0X4mg== X-Received: by 10.200.48.228 with SMTP id w33mr792925qta.314.1504554055862; Mon, 04 Sep 2017 12:40:55 -0700 (PDT) Received: from jordan.home (ool-457a0b4c.dyn.optonline.net. [69.122.11.76]) by smtp.gmail.com with ESMTPSA id n90sm4241797qkl.78.2017.09.04.12.40.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2017 12:40:55 -0700 (PDT) From: Nicholas Bishop To: Jiri Kosina Cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-usb@vger.kernel.org, Nicholas Bishop Subject: [PATCH] HID: add multi-input quirk for IDC6680 touchscreen Date: Mon, 4 Sep 2017 15:40:42 -0400 Message-Id: <20170904194042.16053-1-nbishop@neverware.com> X-Mailer: git-send-email 2.13.5 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 The Ideacom 6680 touchscreen is found in the Dell Latitude 2100. It has two USB descriptors, the first of which has two input reports. The HID_QUIRK_MULTI_INPUT quirk is needed to keep the correct maximum value for ABS_X/ABS_Y (8191 instead of 65535). For reference, here are the full reports: --- BEGIN REPORTS --- cat /sys/kernel/debug/hid/0003:1CB6:6680.0001/rdesc 05 0d 09 04 a1 01 85 0a 09 20 a1 00 09 42 09 32 15 00 25 01 95 02 75 01 81 02 95 06 81 03 05 01 09 31 75 10 95 01 a4 55 0d 65 33 35 00 46 ff 1f 26 ff 1f 81 02 09 30 81 02 b4 05 0d 09 30 81 02 c0 06 00 ff 85 02 09 01 75 08 95 07 b1 02 85 03 09 02 75 08 95 07 b1 02 85 04 09 03 75 08 95 07 b1 02 85 05 09 04 75 08 95 07 b1 02 85 06 09 05 75 08 95 07 b1 02 85 07 09 06 75 08 95 07 b1 02 85 08 09 07 75 08 95 07 b1 02 85 09 09 08 75 08 95 07 b1 02 85 0b 09 09 75 08 95 07 b1 02 85 0c 09 0a 75 08 95 07 b1 02 c0 05 01 09 02 a1 01 85 01 09 01 a1 00 05 09 19 01 29 02 15 00 25 01 75 01 95 02 81 02 75 06 95 01 81 01 05 01 09 31 09 30 27 ff ff 00 00 75 10 95 02 81 02 c0 09 01 a1 02 26 ff 00 75 08 81 03 c0 c0 INPUT(10)[INPUT] Field(0) Physical(Digitizers.Stylus) Application(Digitizers.TouchScreen) Usage(2) Digitizers.TipSwitch Digitizers.InRange Logical Minimum(0) Logical Maximum(1) Report Size(1) Report Count(2) Report Offset(0) Flags( Variable Absolute ) Field(1) Physical(Digitizers.Stylus) Application(Digitizers.TouchScreen) Usage(1) GenericDesktop.Y Logical Minimum(0) Logical Maximum(8191) Physical Minimum(0) Physical Maximum(8191) Unit Exponent(-3) Unit(English Linear : Inch^3) Report Size(16) Report Count(1) Report Offset(8) Flags( Variable Absolute ) Field(2) Physical(Digitizers.Stylus) Application(Digitizers.TouchScreen) Usage(1) GenericDesktop.X Logical Minimum(0) Logical Maximum(8191) Physical Minimum(0) Physical Maximum(8191) Unit Exponent(-3) Unit(English Linear : Inch^3) Report Size(16) Report Count(1) Report Offset(24) Flags( Variable Absolute ) Field(3) Physical(Digitizers.Stylus) Application(Digitizers.TouchScreen) Usage(1) Digitizers.TipPressure Logical Minimum(0) Logical Maximum(1) Report Size(16) Report Count(1) Report Offset(40) Flags( Variable Absolute ) INPUT(1)[INPUT] Field(0) Physical(GenericDesktop.Pointer) Application(GenericDesktop.Mouse) Usage(2) Button.0001 Button.0002 Logical Minimum(0) Logical Maximum(1) Report Size(1) Report Count(2) Report Offset(0) Flags( Variable Absolute ) Field(1) Physical(GenericDesktop.Pointer) Application(GenericDesktop.Mouse) Usage(2) GenericDesktop.Y GenericDesktop.X Logical Minimum(0) Logical Maximum(65535) Report Size(16) Report Count(2) Report Offset(8) Flags( Variable Absolute ) FEATURE(2)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0001 ff00.0001 ff00.0001 ff00.0001 ff00.0001 ff00.0001 ff00.0001 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(3)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0002 ff00.0002 ff00.0002 ff00.0002 ff00.0002 ff00.0002 ff00.0002 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(4)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0003 ff00.0003 ff00.0003 ff00.0003 ff00.0003 ff00.0003 ff00.0003 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(5)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0004 ff00.0004 ff00.0004 ff00.0004 ff00.0004 ff00.0004 ff00.0004 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(6)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0005 ff00.0005 ff00.0005 ff00.0005 ff00.0005 ff00.0005 ff00.0005 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(7)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0006 ff00.0006 ff00.0006 ff00.0006 ff00.0006 ff00.0006 ff00.0006 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(8)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0007 ff00.0007 ff00.0007 ff00.0007 ff00.0007 ff00.0007 ff00.0007 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(9)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0008 ff00.0008 ff00.0008 ff00.0008 ff00.0008 ff00.0008 ff00.0008 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(11)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.0009 ff00.0009 ff00.0009 ff00.0009 ff00.0009 ff00.0009 ff00.0009 Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) FEATURE(12)[FEATURE] Field(0) Application(Digitizers.TouchScreen) Usage(7) ff00.000a ff00.000a ff00.000a ff00.000a ff00.000a ff00.000a ff00.000a Logical Minimum(0) Logical Maximum(1) Report Size(8) Report Count(7) Report Offset(0) Flags( Variable Absolute ) Digitizers.TipSwitch ---> Key.Touch Digitizers.InRange ---> Key.ToolPen GenericDesktop.Y ---> Absolute.Y GenericDesktop.X ---> Absolute.X Digitizers.TipPressure ---> Absolute.Pressure Button.0001 ---> Key.LeftBtn Button.0002 ---> Key.RightBtn GenericDesktop.Y ---> Absolute.Y GenericDesktop.X ---> Absolute.X cat /sys/kernel/debug/hid/0003:1CB6:6680.0002/rdesc 05 01 09 02 a1 01 85 01 09 01 a1 00 05 09 19 01 29 02 15 00 25 01 75 01 95 02 81 02 75 06 95 01 81 01 05 01 09 31 09 30 27 ff ff 00 00 75 10 95 02 81 02 c0 09 01 a1 02 26 ff 00 75 08 81 03 c0 c0 INPUT(1)[INPUT] Field(0) Physical(GenericDesktop.Pointer) Application(GenericDesktop.Mouse) Usage(2) Button.0001 Button.0002 Logical Minimum(0) Logical Maximum(1) Report Size(1) Report Count(2) Report Offset(0) Flags( Variable Absolute ) Field(1) Physical(GenericDesktop.Pointer) Application(GenericDesktop.Mouse) Usage(2) GenericDesktop.Y GenericDesktop.X Logical Minimum(0) Logical Maximum(65535) Report Size(16) Report Count(2) Report Offset(8) Flags( Variable Absolute ) Button.0001 ---> Key.LeftBtn Button.0002 ---> Key.RightBtn GenericDesktop.Y ---> Absolute.Y GenericDesktop.X ---> Absolute.X --- END REPORTS --- Signed-off-by: Nicholas Bishop --- drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index c9ba4c6db74c..33b4f2a2697a 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -531,6 +531,7 @@ #define USB_VENDOR_ID_IDEACOM 0x1cb6 #define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650 #define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651 +#define USB_DEVICE_ID_IDEACOM_IDC6680 0x6680 #define USB_VENDOR_ID_ILITEK 0x222a #define USB_DEVICE_ID_ILITEK_MULTITOUCH 0x0001 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index a88e7c7bea0a..dc0c321baa30 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -99,6 +99,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL }, + { USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C01A, HID_QUIRK_ALWAYS_POLL },