From patchwork Thu Jul 26 20:21:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Schumacher X-Patchwork-Id: 10546409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31108112B for ; Thu, 26 Jul 2018 20:21:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52D402BD1E for ; Thu, 26 Jul 2018 20:21:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 468062BD39; Thu, 26 Jul 2018 20:21:52 +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=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,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 C29852BD1E for ; Thu, 26 Jul 2018 20:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730533AbeGZVkR (ORCPT ); Thu, 26 Jul 2018 17:40:17 -0400 Received: from mout.gmx.net ([212.227.15.18]:58171 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730508AbeGZVkR (ORCPT ); Thu, 26 Jul 2018 17:40:17 -0400 Received: from p2520la.lan ([217.235.92.244]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lxxrw-1g64Lo3QqC-015LFM; Thu, 26 Jul 2018 22:21:48 +0200 From: Tim Schumacher To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, timschumi@gmx.de Subject: [PATCH v2] input/iforce: Reorganize joystick configuration lists Date: Thu, 26 Jul 2018 22:21:44 +0200 Message-Id: <20180726202144.29873-1-timschumi@gmx.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180721114604.4267-1-timschumi@gmx.de> References: <20180721114604.4267-1-timschumi@gmx.de> X-Provags-ID: V03:K1:PfqUlKnNJUnFZUDk3/5ULgbseDGhmXmEQUdz5ikAIZB5IUlMY/x V8IohklAqqU0seGQ/LcxCoA5y61s09xx/cvOCY2n8jksqW6VzlHvmlCtSi2/tFmx6myxop8 Zm7+nbuKO1YXK9fztQBjWqA9MEppSXrFfix4VqA0+EfvMFSax5KhVV53ecNQjcX97e21Sc+ YrnmppNxcPd/peC2WTxmQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:3GgFyJsZxDg=:ITGldR5Nf2BRsuJsNYEjgq Nzr/bnYIexHv4/MD7PxZBMfYS0LjVsCkA/bUKHNe6UVgCtukxBaYYePNLqREew9wAEbBsa35V aS1CZuZj2/e5DFggtx84TeBjvb4QPzSkSUo6/MgHohDFdyYXcoh0AaJbIyUR69znGpmLJR0dd cpHehgLZguR3Z8sseL3B4llzDbUpeOflyT4OH6n3Emlm6cIRGGpoXh2pR+rhqoY5imF6VeW4z IRsnFwpxiz5B7CwPBgtu1ALf6YcpqfnOdcrKxK0htldPsFPY7WvXTespHsDUJ9Wv5DGnfaTMH RhPUq+cN/ymQ5NYhAD6MmQ1Sty9x5TWQzob9ubSAvKEep6HVPLfzpxHKiWRFHRzc80j9CBd4P +eDvbCCznFkX8Fi9EqDdOgGn3BXIMtlJfLogSgFMlRjMVI98A6T82obiDnE39GZXsPwUw8PM6 +e8nw+uphOpTnrZXgg56iUwf2XpqVqfmpukolgPjnmeXerF4hrRD2x4s3FD4Sy1DsUIolymKS RnuGc8o3eCZaK7zF7IN85mpLOFGuonEYV6/XCmN/sOTXMhfKuLeS0NRqxmYpmevVRGXPFv2jN bWUYVdSN0GkOW09mt6Cj4ZJk0TPVtN2u2Cq4ZeDgtIbiUltW6jO/1Qm7p5GzPXbuE+Wkrtgaf 3+eAoEQz5GhM8Xjk8kIrUXAegBhZmTLjCoVy/8twFx6TLrD49msdJ2Zhn6R2dH9TxMaIs+n+O 1GVr8KW2iCkjk+UWI1+1GrWVBfJjqK2dlXoEPaktCKoO3dgh7LG4YU5LoQg= 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 * btn_avb_pegasus and btn_avb_tw are the same. Unify them into btn_joystick_avb. * btn_wheel is an exact copy of btn_joystick, so remove it. Rename btn_avb_wheel into btn_wheel since it is the only sane configuration for a wheel. * Assign the (new) btn_wheel configuration to the "AVB Top Shot Force Feedback Racing Wheel", because the previous configuration was meant for a joystick. Signed-off-by: Tim Schumacher --- drivers/input/joystick/iforce/iforce-main.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index daeeb4c7e3b0..81553e55edfb 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -35,19 +35,11 @@ static signed short btn_joystick[] = { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A, BTN_B, BTN_C, -1 }; -static signed short btn_avb_pegasus[] = -{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, - BTN_BASE2, BTN_BASE3, BTN_BASE4, -1 }; - -static signed short btn_wheel[] = -{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, - BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A, BTN_B, BTN_C, -1 }; - -static signed short btn_avb_tw[] = +static signed short btn_joystick_avb[] = { BTN_TRIGGER, BTN_THUMB, BTN_TOP, BTN_TOP2, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4, -1 }; -static signed short btn_avb_wheel[] = +static signed short btn_wheel[] = { BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_BASE6, -1 }; @@ -73,9 +65,9 @@ static struct iforce_device iforce_device[] = { { 0x044f, 0xa01c, "Thrustmaster Motor Sport GT", btn_wheel, abs_wheel, ff_iforce }, { 0x046d, 0xc281, "Logitech WingMan Force", btn_joystick, abs_joystick, ff_iforce }, { 0x046d, 0xc291, "Logitech WingMan Formula Force", btn_wheel, abs_wheel, ff_iforce }, - { 0x05ef, 0x020a, "AVB Top Shot Pegasus", btn_avb_pegasus, abs_avb_pegasus, ff_iforce }, - { 0x05ef, 0x8884, "AVB Mag Turbo Force", btn_avb_wheel, abs_wheel, ff_iforce }, - { 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel", btn_avb_tw, abs_wheel, ff_iforce }, //? + { 0x05ef, 0x020a, "AVB Top Shot Pegasus", btn_joystick_avb, abs_avb_pegasus, ff_iforce }, + { 0x05ef, 0x8884, "AVB Mag Turbo Force", btn_wheel, abs_wheel, ff_iforce }, + { 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? { 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //? { 0x061c, 0xc084, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //?