From patchwork Fri Jul 27 21:47:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Schumacher X-Patchwork-Id: 10547763 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 B67D71822 for ; Fri, 27 Jul 2018 21:47:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BBFF2C06B for ; Fri, 27 Jul 2018 21:47:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89A482C1FA; Fri, 27 Jul 2018 21:47:45 +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 690162BEF7 for ; Fri, 27 Jul 2018 21:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389755AbeG0XLb (ORCPT ); Fri, 27 Jul 2018 19:11:31 -0400 Received: from mout.gmx.net ([212.227.15.19]:32803 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389752AbeG0XLb (ORCPT ); Fri, 27 Jul 2018 19:11:31 -0400 Received: from p2520la.lan ([217.235.90.75]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MaaOf-1fPArE0u1h-00K6o8; Fri, 27 Jul 2018 23:47:41 +0200 From: Tim Schumacher To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, timschumi@gmx.de Subject: [PATCH v3] Input: iforce - Reorganize joystick configuration lists Date: Fri, 27 Jul 2018 23:47:37 +0200 Message-Id: <20180727214737.13915-1-timschumi@gmx.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726202144.29873-1-timschumi@gmx.de> References: <20180726202144.29873-1-timschumi@gmx.de> X-Provags-ID: V03:K1:+xn8wsze9bMutQeE5lgABtxTcq4PhtJTO178p5nCwg7oxXjG8O7 53/dv0iZxweoTbFCaTlYLpf7eZUoSvdzZT+FPKy1AgcRse645AcZNhOOSHSjf1s1cx7GGtC Ybk22TwS7ZxnH7/1kefJHg+XHCGMTRHeLFFl8w0af4xhpuruVkHTqv1loL8iDvMFmyM92E9 4Or9Fb/T/0tqUqzt86ZPg== X-UI-Out-Filterresults: notjunk:1;V01:K0:twId7yXHt6A=:dgIQ3DWG9M8hfokdfntsTQ sxq4v7s9QEILEqamu0Ssn1DRKN5QeJrnaAtpWFfo3CnK6MtltqCxnz5Ez8n1iFVEBVB6T7z47 p1O5rsMQLxZy5ALkoREdsmIGbgYKXrGj0DsOrnacLB/Ocd7B7+QbYXS0rkl+GoZEAYevh+iDJ ID8u/N6JaDdW1+cZ/OeuQhqOYDoyvU48NHT72K8g+cwp8raK2ISMpLKZJGAhajqEon+kY5uVJ lcAJlusxtx/KIIZ2VeV9ZnUIgpCb2DhSFwtmQVMnPF8Bpp3+1VmiuKjkNtSTcRVoc6pkptr7J a0gZ3EzQGFNNyLHWjTEIcLinSHqM36AoTe/nGH05QpO4wYt8dmf8Yp7amBQtP3TZRF1xm0iqH bTWTaQ/e+RjcX1fLimGntTIdlQ5GdBhWQSLGOLRsFNJuMFlHMXZJTpLcgTw3nqeQpeNGUG+Pl qXAa89w84ysClkCbDLDqP4wtETkREtF3FC19Bpy9gw78sPaOS34s6mapjOzWdFZne3YegeUf/ YX4k6R1nAzfaLaVKj6t4ccNWdYLmPSiuN/v4Sln/hz2m5yd6hlCFJKgTg/oqz3RY3o/ewmgVO drCdLlRHqoQ+WrNhYfx2vOE6gZ7v8bNFnvsVKfFHHuFs3ZoqU32CaHPSDOrscuPYq9BX+4Uj8 7nUYy627jw19GKK87LDzTgLKt1/uvYlZi0w4vk0T0XP70XLBSNVI5/B09q0djpsb21XTEc0Tc d+zN1EA3dh2rU7iyKq2eh9mwrg0aoLHhGEyU+F1qvNAcfGNaHRAHxytuUrE= 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 --- This patch contains nothing new when compared to the previous one, I just modified it to apply cleanly on top of the BTN_DEAD change. drivers/input/joystick/iforce/iforce-main.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 9a15caa7ae5f..58d5cfe46526 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -32,20 +32,11 @@ static signed short btn_joystick[] = BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A, BTN_B, BTN_C, BTN_DEAD, -1 }; -static signed short btn_avb_pegasus[] = -{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, - BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_DEAD, -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, BTN_DEAD, -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, BTN_DEAD, -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 }; @@ -71,9 +62,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 }, //?