Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp242728pxf; Wed, 10 Mar 2021 05:29:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/7YwvYKcv+q25Ytrlfd9kpGPfMUjS/VhidJe2nk3yn42MwPLwOlXN0J8jbAhAOcCBa6Cl X-Received: by 2002:a17:906:1a16:: with SMTP id i22mr3679354ejf.522.1615382997728; Wed, 10 Mar 2021 05:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615382997; cv=none; d=google.com; s=arc-20160816; b=AKpnwgbcW6DjVrnW8LlfiM+35Vpv+C5mci97IEktbWUtFoenMvJNI+pZR/YOvIj775 pZVZgXQ4xQWsNv2K5aEX8uEL2TkMZ9BbpPR0COBmXv/6p2MO2K/Wy9Nb0UUAYg4OCB+T H2/PM4POQu8/hNbF3gMygInLf4TVwEC5Gn/zxm7ltvs/qGlI6z5jw4whFSZ6icOZpBoD GQvSh3Wl6auf3ks3KgaCMX+kDFC2a01Lt402UJkSuraB0c4TUQxbGgMYYCHmsCEwB77D qRQ3TZfp3aQB1cWNywOIvEeTijtPSZAhf2l68nUjADuR8DQaMYrXL7chuERWQttRWBV7 KhJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I+xmtlc9Lke9mF3XHQD5KF9gDjAjv35LSP9r5tI76kU=; b=DyfP7kXiBgq4r2QjGfzUekBdE+wD1xItoAp2qR+FGLbWkMB5/obRFUOsWzCquaXM2o +cXLxTCl0EPnwM6AbrN2AuKRqUeYFpA6ZZ0h12oYpbeie7ai3QkH+We8zggLXF5+aHIl 4JZO97kXg4crp8N5xMF21nj6Xc/tQSh2RhoIsnyhkKaBXmewPElNnvLoVklON7TrRjec sKAECPLhX00NeCi5OUyIKEtQv4k7bHRnUgttQkAnyqMBPvP/8drKwHiATrDoKrsZjjTx 5xvafdnYNPl8OoIyOWWhfeC/Y57A5acbALtpuTj7hT0cFlGuIM+K/xUensS8hKExDVIm SBsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RTc9qXOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si11754715ejx.201.2021.03.10.05.29.34; Wed, 10 Mar 2021 05:29:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RTc9qXOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233955AbhCJN1m (ORCPT + 99 others); Wed, 10 Mar 2021 08:27:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:46636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233200AbhCJNZF (ORCPT ); Wed, 10 Mar 2021 08:25:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4763D64FFB; Wed, 10 Mar 2021 13:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382704; bh=/Jk6kFVXqUQGFcZcbH3xg6FML+d5pKZ843w7fXmcXhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTc9qXOHJW90RW6f0PkDQYDyxR+Ggc8CoNniqD6wlVTn0BEU3/7b1rdmUiKAPjTzq dsEckivviihBukUgqqSq23UD58O1QMKAvuPFcbDuXhcr41PsccSm2HEOS9TVNfEHNW GJQFEexSSvUuytVk95QBIvodO1YYdCHB5jxVRiG4= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ethan Warth , "Wladimir J. van der Laan" , Jiri Kosina , Sasha Levin Subject: [PATCH 5.4 14/24] HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter Date: Wed, 10 Mar 2021 14:24:26 +0100 Message-Id: <20210310132320.982693838@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132320.550932445@linuxfoundation.org> References: <20210310132320.550932445@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Ethan Warth [ Upstream commit 1008230f2abeb624f6d71b2e1c424fa4eeebbf84 ] Mayflash/Dragonrise seems to have yet another device ID for one of their Gamecube controller adapters. Previous to this commit, the adapter registered only one /dev/input/js* device, and all controller inputs (from any controller) were mapped to this device. This patch defines the 1846 USB device ID and enables the HID_QUIRK_MULTI_INPUT quirk for it, which fixes that (with the patch, four /dev/input/js* devices are created, one for each of the four controller ports). Signed-off-by: Ethan Warth Tested-by: Wladimir J. van der Laan Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-mf.c | 2 ++ drivers/hid/hid-quirks.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 33183933337a..fc499c9039a0 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -365,6 +365,7 @@ #define USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR 0x1803 #define USB_DEVICE_ID_DRAGONRISE_GAMECUBE1 0x1843 #define USB_DEVICE_ID_DRAGONRISE_GAMECUBE2 0x1844 +#define USB_DEVICE_ID_DRAGONRISE_GAMECUBE3 0x1846 #define USB_VENDOR_ID_DWAV 0x0eef #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 diff --git a/drivers/hid/hid-mf.c b/drivers/hid/hid-mf.c index fc75f30f537c..92d7ecd41a78 100644 --- a/drivers/hid/hid-mf.c +++ b/drivers/hid/hid-mf.c @@ -153,6 +153,8 @@ static const struct hid_device_id mf_devices[] = { .driver_data = HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2), .driver_data = 0 }, /* No quirk required */ + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE3), + .driver_data = HID_QUIRK_MULTI_INPUT }, { } }; MODULE_DEVICE_TABLE(hid, mf_devices); diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c index 60d188a704e5..f35d919c4eba 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -72,6 +72,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_REDRAGON_SEYMUR2), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1), HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE3), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER), HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, @@ -491,6 +492,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE3) }, #endif #if IS_ENABLED(CONFIG_HID_MICROSOFT) { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500) }, -- 2.30.1