From patchwork Mon Oct 16 07:29:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Mueller X-Patchwork-Id: 10007871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB11460230 for ; Mon, 16 Oct 2017 08:03:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD35F28113 for ; Mon, 16 Oct 2017 08:03:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1DD82811E; Mon, 16 Oct 2017 08:03:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6278528113 for ; Mon, 16 Oct 2017 08:03:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284AbdJPIDS (ORCPT ); Mon, 16 Oct 2017 04:03:18 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]:55060 "EHLO smtprelay05.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbdJPIDR (ORCPT ); Mon, 16 Oct 2017 04:03:17 -0400 X-Greylist: delayed 1905 seconds by postgrey-1.27 at vger.kernel.org; Mon, 16 Oct 2017 04:03:17 EDT Received: from [84.174.42.138] (helo=ubuntu.fritz.box) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89) (envelope-from ) id 1e3zry-0004d2-Tu; Mon, 16 Oct 2017 09:31:26 +0200 From: Florian Mueller To: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Cc: contact@petrockblock.com Subject: [PATCH] HID: add multi-input quirk for GamepadBlock Date: Mon, 16 Oct 2017 09:29:11 +0200 Message-Id: <1508138951-5018-1-git-send-email-contact@petrockblock.com> X-Mailer: git-send-email 2.7.4 X-Df-Sender: Y29udGFjdEBwZXRyb2NrYmxvY2suY29t Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The GamepadBlock game controller adapter needs HID_QUIRK_MULTI_INPUT to split it up into two input devices. Without this quirk the adapter is falsely recognized as only one device and mixes up the inputs of the two connected controllers. Signed-off-by: Florian Mueller --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index a989191..1b1c86d 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -727,6 +727,9 @@ #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a +#define USB_VENDOR_ID_MCS 0x16d0 +#define USB_DEVICE_ID_MCS_GAMEPADBLOCK 0x0bcc + #define USB_VENDOR_ID_MGE 0x0463 #define USB_DEVICE_ID_MGE_UPS 0xffff #define USB_DEVICE_ID_MGE_UPS1 0x0001 diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index f489a5c..331f7f3 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -170,6 +170,7 @@ static const struct hid_blacklist { { 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 }, { USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_MCS, USB_DEVICE_ID_MCS_GAMEPADBLOCK, HID_QUIRK_MULTI_INPUT }, { 0, 0 } };