linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Adrien Vergé" <adrienverge@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Oliver Neukum <oneukum@suse.com>, Jiri Kosina <jikos@kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Logan Gunthorpe" <logang@deltatee.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Vincent Palatin" <vpalatin@chromium.org>,
	"Adrien Vergé" <adrienverge@gmail.com>,
	"Macpaul Lin" <macpaul@gmail.com>,
	"Adel Gadllah" <adel.gadllah@gmail.com>,
	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	[thread overview]
Message-ID: <1448377325-4725-3-git-send-email-adrienverge@gmail.com> (raw)
In-Reply-To: <1448377325-4725-1-git-send-email-adrienverge@gmail.com>

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é <adrienverge@gmail.com>
Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
---
 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)
-- 
2.4.3

--
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

  parent reply	other threads:[~2015-11-24 15:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-22  4:06 [PATCH] USB: quirks: Fix another ELAN touchscreen Adrien Vergé
2015-11-23 14:52 ` Jiri Kosina
2015-11-23 17:37   ` Adrien Vergé
2015-11-24  7:29     ` Oliver Neukum
2015-11-23 17:43 ` [PATCH v2] " Adrien Vergé
2015-11-24 13:49 ` [PATCH v3 0/2] Fixes for ELAN touchscreens Adrien Vergé
2015-11-24 13:49   ` [PATCH v3 1/2] USB: quirks: Fix another ELAN touchscreen Adrien Vergé
2015-11-24 13:49   ` [PATCH v3 2/2] USB: quirks: Apply ALWAYS_POLL to all ELAN devices Adrien Vergé
2015-11-24 14:11     ` Benjamin Tissoires
2015-11-24 14:34       ` Adrien Vergé
2015-11-24 15:02 ` [PATCH v4 0/2] Fixes for ELAN touchscreens Adrien Vergé
2015-11-24 15:02   ` [PATCH v4 1/2] USB: quirks: Fix another ELAN touchscreen Adrien Vergé
2015-11-24 15:02   ` Adrien Vergé [this message]
2015-11-24 16:11     ` [PATCH v4 2/2] USB: quirks: Apply ALWAYS_POLL to all ELAN devices Benjamin Tissoires
2015-11-24 16:41     ` kbuild test robot
2015-12-01 18:21     ` Greg Kroah-Hartman
2015-12-01 18:56 ` [PATCH v5 0/2] Fixes for ELAN touchscreens Adrien Vergé
2015-12-01 18:56   ` [PATCH v5 1/2] USB: quirks: Fix another ELAN touchscreen Adrien Vergé
2015-12-01 18:56   ` [PATCH v5 2/2] USB: quirks: Apply ALWAYS_POLL to all ELAN devices Adrien Vergé
     [not found]     ` <1448996208-19713-3-git-send-email-adrienverge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-01 22:09       ` Jiri Kosina
2015-12-01 22:11         ` Greg Kroah-Hartman
2015-12-02  8:53           ` Adrien Vergé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448377325-4725-3-git-send-email-adrienverge@gmail.com \
    --to=adrienverge@gmail.com \
    --cc=adel.gadllah@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=macpaul@gmail.com \
    --cc=oneukum@suse.com \
    --cc=vpalatin@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).