From patchwork Tue Nov 6 18:41:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forest Bond X-Patchwork-Id: 1706091 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4521FDFE75 for ; Tue, 6 Nov 2012 18:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751556Ab2KFSoq (ORCPT ); Tue, 6 Nov 2012 13:44:46 -0500 Received: from storm.alittletooquiet.net ([67.23.28.199]:42210 "EHLO storm.alittletooquiet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060Ab2KFSop (ORCPT ); Tue, 6 Nov 2012 13:44:45 -0500 Received: by storm.alittletooquiet.net (Postfix, from userid 1000) id D761428D492; Tue, 6 Nov 2012 13:41:22 -0500 (EST) Date: Tue, 6 Nov 2012 13:41:22 -0500 From: Forest Bond To: Jiri Kosina Cc: Dmitry Torokhov , Daniel Ritz , Alan Stern , Sergei Shtylyov , linux-input@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen Message-ID: <20121106184122.GT12501@alittletooquiet.net> MIME-Version: 1.0 Content-Disposition: inline X-PGP-Key: http://www.alittletooquiet.net/media/forest.pubkey.asc X-PGP-Fingerprint: 428A 6D9B EFEC EC9E 5E48 6B8F 44EE 1F41 076F E40C X-PGP-Affinity: will accept encrypted message for GPG X-Home-Page: http://www.alittletooquiet.net/ X-Accept-Language: en Jabber-ID: forestatq@jabber.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Forest Bond Previously, both usbhid and usbtouchscreen would bind to D-WAV devices with class HID and protocol None, so they would be claimed by whichever driver was loaded first. Some of these devices do in fact work with usbhid, but not all of them do. OTOH they all work with usbtouchscreen as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input: usbtouchscreen - initialize eGalax devices"). So we ignore them in usbhid to prevent getting in the way of usbtouchscreen and claiming an interface that we may not be able to do anything useful with. Signed-off-by: Forest Bond --- drivers/hid/hid-core.c | 11 ++++++++++- drivers/hid/hid-ids.h | 1 + 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f4109fd..f2d614e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2188,7 +2188,16 @@ static bool hid_ignore(struct hid_device *hdev) if (hdev->product == USB_DEVICE_ID_JESS_YUREX && hdev->type == HID_TYPE_USBNONE) return true; - break; + break; + case USB_VENDOR_ID_DWAV: + /* These are handled by usbtouchscreen. hdev->type is probably + * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match + * usbtouchscreen. */ + if ((hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER || + hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) && + hdev->type != HID_TYPE_USBMOUSE) + return true; + break; } if (hdev->type == HID_TYPE_USBMOUSE && diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 9d7a428..3d73774 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -257,6 +257,7 @@ #define USB_VENDOR_ID_DWAV 0x0eef #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 +#define USB_DEVICE_ID_DWAV_TOUCHCONTROLLER 0x0002 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207 0x7207