From patchwork Tue Nov 24 15:02:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Adrien_Verg=C3=A9?= X-Patchwork-Id: 7691821 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3BECBF90C for ; Tue, 24 Nov 2015 15:03:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0ECE620840 for ; Tue, 24 Nov 2015 15:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F4E92083F for ; Tue, 24 Nov 2015 15:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532AbbKXPDA (ORCPT ); Tue, 24 Nov 2015 10:03:00 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36642 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254AbbKXPCn (ORCPT ); Tue, 24 Nov 2015 10:02:43 -0500 Received: by wmww144 with SMTP id w144so142421659wmw.1; Tue, 24 Nov 2015 07:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=NJtcLAT7cUSSOQPn3BiQeE899FUyLN27UZcRN6pGGh4=; b=ytQGZRNNz+iQ7yxc3p7aJOuZUryzZ61m8fBH0HMJeoJK8kwxBxG+OfCqCj6OqF4UAA 7yyX5MsJWl/zLqViKe8Kf+arRkQFhywbKObqJlRn2EZHoWYm4Sa8z46zJrCb5iPuiXUd jXKAuhmqzBrH0k92ArYDNwu+cGyltFsvNZkIJ7142PXqgFlG2PM45V7hoPsxBPo0ie4z pQGPuiZWn834iKj1xbYZY7VxASpyMiIeYEyirb+jDuR0649BfkyIoA+ydclJ4QbMK4XX 5+KsPJjPuVexNJPz6RP0TA84w1Shu6VjYrZ4m0S8fnF7uqnA8S6IoOTWUmJkbui/+S9n ymkA== X-Received: by 10.28.72.136 with SMTP id v130mr25228445wma.60.1448377361362; Tue, 24 Nov 2015 07:02:41 -0800 (PST) Received: from e7450.localdomain (204.13-14-84.ripe.coltfrance.com. [84.14.13.204]) by smtp.googlemail.com with ESMTPSA id e83sm18594019wmc.23.2015.11.24.07.02.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 07:02:40 -0800 (PST) From: =?UTF-8?q?Adrien=20Verg=C3=A9?= To: Benjamin Tissoires , Oliver Neukum , Jiri Kosina Cc: Greg Kroah-Hartman , Logan Gunthorpe , Hans de Goede , Vincent Palatin , =?UTF-8?q?Adrien=20Verg=C3=A9?= , Macpaul Lin , Adel Gadllah , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v4 2/2] USB: quirks: Apply ALWAYS_POLL to all ELAN devices Date: Tue, 24 Nov 2015 16:02:05 +0100 Message-Id: <1448377325-4725-3-git-send-email-adrienverge@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1448377325-4725-1-git-send-email-adrienverge@gmail.com> References: <1448165164-11398-1-git-send-email-adrienverge@gmail.com> <1448377325-4725-1-git-send-email-adrienverge@gmail.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All ELAN hid devices seem to require the ALWAYS_POLL quirk. Let's use this quirk for all devices from this vendor, rather than maintaining a list of all its known product IDs. Tested-by: Adrien Vergé Signed-off-by: Adrien Vergé Reviewed-by: Benjamin Tissoires --- drivers/hid/hid-ids.h | 5 ----- drivers/hid/usbhid/hid-quirks.c | 9 +++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index ac1feea..3c7e0c3 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -316,11 +316,6 @@ #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 #define USB_VENDOR_ID_ELAN 0x04f3 -#define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089 -#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B 0x009b -#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103 0x0103 -#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c 0x010c -#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F 0x016f #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 94bb137..b1af008 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -72,11 +72,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT }, - { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN, HID_QUIRK_ALWAYS_POLL }, - { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B, HID_QUIRK_ALWAYS_POLL }, - { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103, HID_QUIRK_ALWAYS_POLL }, - { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c, HID_QUIRK_ALWAYS_POLL }, - { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F, HID_QUIRK_ALWAYS_POLL }, + { USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, @@ -339,7 +335,8 @@ static const struct hid_blacklist *usbhid_exists_squirk(const u16 idVendor, for (; hid_blacklist[n].idVendor; n++) if (hid_blacklist[n].idVendor == idVendor && - hid_blacklist[n].idProduct == idProduct) + (hid_blacklist[n].idProduct == HID_ANY_ID || + hid_blacklist[n].idProduct == idProduct)) bl_entry = &hid_blacklist[n]; if (bl_entry != NULL)