From patchwork Sat Apr 25 20:30:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Assenat X-Patchwork-Id: 6275151 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9A2FE9F389 for ; Sat, 25 Apr 2015 20:30:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1FC42024C for ; Sat, 25 Apr 2015 20:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A083B20225 for ; Sat, 25 Apr 2015 20:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbbDYUaj (ORCPT ); Sat, 25 Apr 2015 16:30:39 -0400 Received: from mout.perfora.net ([74.208.4.196]:57857 "EHLO mout.perfora.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbbDYUai (ORCPT ); Sat, 25 Apr 2015 16:30:38 -0400 Received: from yggdrasil2.lan.raphnet.net ([66.130.55.206]) by mrelay.perfora.net (mreueus002) with ESMTPSA (Nemesis) id 0Lessj-1Z5zOg3oT9-00qmw3; Sat, 25 Apr 2015 22:30:34 +0200 Received: from raph by yggdrasil2.lan.raphnet.net with local (Exim 4.72) (envelope-from ) id 1Ym6ie-0006XT-KE; Sat, 25 Apr 2015 16:30:32 -0400 Date: Sat, 25 Apr 2015 16:30:32 -0400 From: Raphael Assenat To: linux-usb@vger.kernel.org Cc: Jiri Kosina , linux-input@vger.kernel.org Subject: [PATCH,v2] usbhid: Add a quirk for raphnet multi-gamepad adapters Message-ID: <20150425203032.GA24785@yggdrasil2.lan.raphnet.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Provags-ID: V03:K0:tHlrCcH9iX111ovca6JOeBIFrfdt6U49oAVfn/EyrCVUBcRNCuV xWwj70cvk6BWvRrhVjJL0jmsXqEUAwc0ycIJdVMu0IFk+oIxBMs8SU6Rdw3QaRjLgOaU+KC eOhR8s+uBpOLHF24pcFs2AO+r7FS/16yLjodRWp70RBddffJejSpHxDyw2tb3SgjtLfbJoL 6GP20sskmjhRR9qqEEcmg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The raphnet.net 4nes4snes and 2nes2snes multi-joystick adapters use a single HID report descriptor with one report ID per controller. This has the effect that the inputs of otherwise independent game controllers get packed in one large joystick device. With this patch each controller gets its own /dev/input/jsX device, which is more natural and less confusing than having all inputs going to the same place. Signed-off-by: Raphael Assenat --- v2: Rebased on Linux 4.0 -- 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 diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 9c47867..1a57e86 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1028,4 +1028,11 @@ #define USB_VENDOR_ID_RISO_KAGAKU 0x1294 /* Riso Kagaku Corp. */ #define USB_DEVICE_ID_RI_KA_WEBMAIL 0x1320 /* Webmail Notifier */ +#define USB_VENDOR_ID_MULTIPLE_1781 0x1781 +#define USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD 0x0a8d + +#define USB_VENDOR_ID_DRACAL_RAPHNET 0x289b +#define USB_DEVICE_ID_RAPHNET_2NES2SNES 0x0002 +#define USB_DEVICE_ID_RAPHNET_4NES4SNES 0x0003 + #endif diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index a821277..209ec17 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -136,6 +136,9 @@ static const struct hid_blacklist { { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096, HID_QUIRK_NO_INIT_INPUT_REPORTS }, + { USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT }, { 0, 0 } };