From patchwork Sat Jan 7 11:11:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Hasler X-Patchwork-Id: 9502979 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 D74A0606E1 for ; Sat, 7 Jan 2017 11:11:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8B1828452 for ; Sat, 7 Jan 2017 11:11:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDAC528461; Sat, 7 Jan 2017 11:11:15 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 3552C28452 for ; Sat, 7 Jan 2017 11:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032198AbdAGLLO (ORCPT ); Sat, 7 Jan 2017 06:11:14 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34576 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031972AbdAGLLN (ORCPT ); Sat, 7 Jan 2017 06:11:13 -0500 Received: by mail-wm0-f65.google.com with SMTP id c85so10376863wmi.1 for ; Sat, 07 Jan 2017 03:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :in-reply-to:user-agent; bh=gCEadDfKqrrpLAB2/fg1HCXy8sCb5MXR7mg8Xr5A7Ak=; b=sYNc0iyjmMBOBeiFdH+6Ma1HgWst1VRhUQi7NQ2dBgN4CgXFPdKfZrm53Z8JlR4pTi 7GY3pPnmfynSmgyyKt3Nz65dL3I7bUDHjd4asciFh+jyCI4e2Qpe2eoyYz/zV8OVKl3M vgm4IQC/IEUSSlGex9aKovcZw568V7oJms7j6sIHDYwYK7USDurEv4ZuS0MiK3GciEc8 2XNemVkkJLI+IsIYpgkrCHlyKfoZ2863uO86RX+9PjE/M75jJlSupXtm9MJ5oLqUnR89 UWANfrYlFtq/a9k4hrsmY/ntUFOhNF1BRWqdo0StDJeJ28jmD1/PxGIA4vXYk1Cxb2T+ h6jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:in-reply-to:user-agent; bh=gCEadDfKqrrpLAB2/fg1HCXy8sCb5MXR7mg8Xr5A7Ak=; b=T4LPZ0Fuf3g5CCf3iroqYjD8d5SAsrdo8z9ApZcExX7w1rLc7pILIRTOBtWbRlCSeP 4Mu7JBv/s7ia6J++OgCo6rO191G65tpWr6qQ7NXhIe2nigioIQcVFdxmgfMBGwr1ItJw 2w2Fj+NafYejzuxr/jiSF5mTAeuivnw12cNNYLzyib3wvO03f6uVo6JpqjlLv7T2RYqg 3mTptIRozLkZ8LMnbmlMhwFZ54nbsaBRHadtUri4Gs5D2TVKBrT9cO2JCyp+na3ZAQ0Y c77E535t4PBNl5bC5goIoF1ULioACYv6/JYGzdNE65MLNBTMZBguRM0OCiGcupHSi7O3 n3uQ== X-Gm-Message-State: AIkVDXIijImL5C0kllcuRahvlSYDr2knDSODgD4UO5udlp+2IzYpbLo/cqxMwkk96NfgqA== X-Received: by 10.28.234.193 with SMTP id g62mr1065935wmi.36.1483787472229; Sat, 07 Jan 2017 03:11:12 -0800 (PST) Received: from arch-desktop ([2a02:908:670:9d40:728b:cdff:fe7f:6af7]) by smtp.gmail.com with ESMTPSA id cs4sm6575242wjd.42.2017.01.07.03.11.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 03:11:11 -0800 (PST) Date: Sat, 7 Jan 2017 12:11:07 +0100 From: Marcel Hasler To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org Subject: [PATCH 2/2] hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters. Message-ID: <20170107111107.GA20674@arch-desktop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170107110926.GA14173@arch-desktop> User-Agent: Mutt/1.7.2 (2016-11-26) 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 Mayflash DolphinBar and GameCube adapters have been tested and confirmed to work using the hid-mf driver. Signed-off-by: Marcel Hasler --- drivers/hid/hid-core.c | 3 +++ drivers/hid/hid-mf.c | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index cff060b56da9..54e98ff7090d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1887,6 +1887,9 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) }, #if IS_ENABLED(CONFIG_HID_MAYFLASH) { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3) }, + { 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) }, #endif { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_WN) }, { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_FA) }, diff --git a/drivers/hid/hid-mf.c b/drivers/hid/hid-mf.c index d9090765a6e5..03f10516131d 100644 --- a/drivers/hid/hid-mf.c +++ b/drivers/hid/hid-mf.c @@ -6,12 +6,14 @@ * * Tested with: * 0079:1801 "DragonRise Inc. Mayflash PS3 Game Controller Adapter" + * 0079:1803 "DragonRise Inc. Mayflash Wireless Sensor DolphinBar" + * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter" + * 0079:1844 "DragonRise Inc. Mayflash GameCube Game Controller Adapter (v04)" * * The following adapters probably work too, but need to be tested: * 0079:1800 "DragonRise Inc. Mayflash WIIU Game Controller Adapter" - * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter" * - * Copyright (c) 2016 Marcel Hasler + * Copyright (c) 2016-2017 Marcel Hasler */ /* @@ -125,8 +127,8 @@ static int mf_probe(struct hid_device *hid, const struct hid_device_id *id) dev_dbg(&hid->dev, "Mayflash HID hardware probe...\n"); - /* Split device into four inputs */ - hid->quirks |= HID_QUIRK_MULTI_INPUT; + /* Apply quirks as needed */ + hid->quirks |= id->driver_data; error = hid_parse(hid); if (error) { @@ -151,7 +153,14 @@ static int mf_probe(struct hid_device *hid, const struct hid_device_id *id) } static const struct hid_device_id mf_devices[] = { - { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), + .driver_data = HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR), + .driver_data = HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1), + .driver_data = HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2), + .driver_data = 0 }, /* No quirk required */ { } }; MODULE_DEVICE_TABLE(hid, mf_devices);