From patchwork Mon Oct 28 16:47:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 3103331 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5FD37BF924 for ; Mon, 28 Oct 2013 16:48:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23C0C202F9 for ; Mon, 28 Oct 2013 16:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2B54202EC for ; Mon, 28 Oct 2013 16:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756711Ab3J1QsU (ORCPT ); Mon, 28 Oct 2013 12:48:20 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:55705 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756591Ab3J1QsT (ORCPT ); Mon, 28 Oct 2013 12:48:19 -0400 Received: by mail-ee0-f54.google.com with SMTP id t10so3373516eei.13 for ; Mon, 28 Oct 2013 09:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=5Q+vHdTv/rR7JLO1gLp97a850nmxH7BgVM3A23Ztfx0=; b=HJEBHOFUVQMoAzdnRhUV1E7VqlUUWWNjzCdDNcC8ome1yGqmdADzOTq9TGewGqVVb0 Wwzks3Iay0rVbtVocWzw+5pLybaUXs/W9kcbc5isIyjbuHXPIGWelThWRUEBEwMvlVSt 6ke57HhmC4sQEjb/QCe40PuOMFAHRIjCni9nPRRO91ph0FuUG1obcOS4Y+UrL1GnHSVH RO71+XT9WqWPgJFUmQvrIlYVU7qZyXaL7y+JclwbfvGs5/9+XnlkVoh/4B9Ja4/KNTtH bdIkC+BkFeKeeFPSBw7I8UHd/Woq+782oPrIqCAFqNd94uSvc5qbMdoEG1SDmkVFVv1l rutQ== X-Received: by 10.15.77.132 with SMTP id p4mr862056eey.95.1382978898610; Mon, 28 Oct 2013 09:48:18 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71be96.pool.mediaWays.net. [95.113.190.150]) by mx.google.com with ESMTPSA id u46sm59318866eep.17.2013.10.28.09.48.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2013 09:48:17 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Rafael Brune , Jiri Kosina , David Herrmann , Subject: [PATCH] HID: wiimote: fix inverted pro-controller axes Date: Mon, 28 Oct 2013 17:47:53 +0100 Message-Id: <1382978873-802-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.4.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The analog-stick vertical axes are inverted. Fix that! Otherwise, games and other gamepad applications need to carry their own fixups (which they thankfully haven't done, yet). Cc: # 3.11+ Reported-by: Rafael Brune Signed-off-by: David Herrmann Tested-by: Rafael Brune --- drivers/hid/hid-wiimote-modules.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c index 71adf9e..e30567a 100644 --- a/drivers/hid/hid-wiimote-modules.c +++ b/drivers/hid/hid-wiimote-modules.c @@ -1656,9 +1656,9 @@ static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext) ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8); input_report_abs(wdata->extension.input, ABS_X, lx - 0x800); - input_report_abs(wdata->extension.input, ABS_Y, ly - 0x800); + input_report_abs(wdata->extension.input, ABS_Y, 0x800 - ly); input_report_abs(wdata->extension.input, ABS_RX, rx - 0x800); - input_report_abs(wdata->extension.input, ABS_RY, ry - 0x800); + input_report_abs(wdata->extension.input, ABS_RY, 0x800 - ry); input_report_key(wdata->extension.input, wiimod_pro_map[WIIMOD_PRO_KEY_RIGHT],