From patchwork Wed Mar 27 20:07:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 2353021 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 47DF93FD40 for ; Wed, 27 Mar 2013 20:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754333Ab3C0UHl (ORCPT ); Wed, 27 Mar 2013 16:07:41 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:39140 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754203Ab3C0UHk (ORCPT ); Wed, 27 Mar 2013 16:07:40 -0400 Received: by mail-pd0-f178.google.com with SMTP id u10so3702109pdi.9 for ; Wed, 27 Mar 2013 13:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:mime-version; bh=OQarcJC45bvtH4ckmQ3B6m2SYgniv12/7reUxXuzyu0=; b=A99tQOwD2od+WJJXfz1amCnq/mUyT+y8XE5Chcvs01aQEKGERZ+gCfZ/YCPIEZV6hD 2UCLloSHfJ0vE70xvsEGhR3nYLjV82WNJEsaRj9D8VBWbkw87RILAIf+EO9gmixBaDyR RKLCz1F4aKpyy+CR/I/mMzLtPXp1B78cL4A7Vi/1JDlImzbHL+HXT4gg6k+10RWM69u1 hn0Qh6F6hp1hWYbfGPhQXgXl7olH9aBinDjAgMANjCm1RPuJvoFWZtMzVym5gTqMw3N8 4ug/lenboUzjoL+Y1M/8HbHPkbmz6mJG4CjAL4JPPH8YS8qF6jVooQzUMCk0ZAfbQnVP gL2Q== X-Received: by 10.66.250.135 with SMTP id zc7mr31191982pac.162.1364414860341; Wed, 27 Mar 2013 13:07:40 -0700 (PDT) Received: from [61.83.230.213] ([61.83.230.213]) by mx.google.com with ESMTPS id in5sm22570260pbc.20.2013.03.27.13.07.38 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 27 Mar 2013 13:07:39 -0700 (PDT) Message-ID: <1364414849.3909.24.camel@samsungRC530> Subject: [patch 1/2] hid: fix Masterkit MA901 hid quirks From: Alexey Klimov To: jkosina@suse.cz Cc: linux-input@vger.kernel.org, linux-media@vger.kernel.org, linux@wagner-budenheim.de, klimov.linux@gmail.com Date: Thu, 28 Mar 2013 00:07:29 +0400 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch reverts commit 0322bd3980b3ebf7dde8474e22614cb443d6479a and adds checks in hid_ignore() for Masterkit MA901 usb radio device. This usb radio device shares USB ID with many Atmel V-USB (and probably other) devices so patch sorts things out by checking name, vendor, product of hid device. Signed-off-by: Alexey Klimov --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 512b01c..aa341d1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2077,7 +2077,6 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, - { HID_USB_DEVICE(USB_VENDOR_ID_MASTERKIT, USB_DEVICE_ID_MASTERKIT_MA901RADIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) }, @@ -2244,6 +2243,18 @@ bool hid_ignore(struct hid_device *hdev) hdev->product <= USB_DEVICE_ID_VELLEMAN_K8061_LAST)) return true; break; + case USB_VENDOR_ID_ATMEL_V_USB: + /* Masterkit MA901 usb radio based on Atmel tiny85 chip and + * it has the same USB ID as many Atmel V-USB devices. This + * usb radio is handled by radio-ma901.c driver so we want + * ignore the hid. Check the name, bus, product and ignore + * if we have MA901 usb radio. + */ + if (hdev->product == USB_DEVICE_ID_ATMEL_V_USB && + hdev->bus == BUS_USB && + strncmp(hdev->name, "www.masterkit.ru MA901", 22) == 0) + return true; + break; } if (hdev->type == HID_TYPE_USBMOUSE && diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 92e47e5..57d9f3a 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -158,6 +158,8 @@ #define USB_VENDOR_ID_ATMEL 0x03eb #define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c #define USB_DEVICE_ID_ATMEL_MXT_DIGITIZER 0x2118 +#define USB_VENDOR_ID_ATMEL_V_USB 0x16c0 +#define USB_DEVICE_ID_ATMEL_V_USB 0x05df #define USB_VENDOR_ID_AUREAL 0x0755 #define USB_DEVICE_ID_AUREAL_W01RN 0x2626 @@ -557,9 +559,6 @@ #define USB_VENDOR_ID_MADCATZ 0x0738 #define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 -#define USB_VENDOR_ID_MASTERKIT 0x16c0 -#define USB_DEVICE_ID_MASTERKIT_MA901RADIO 0x05df - #define USB_VENDOR_ID_MCC 0x09db #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a