From patchwork Thu Oct 3 13:27:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2982821 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 670399F289 for ; Thu, 3 Oct 2013 13:27:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C04942035C for ; Thu, 3 Oct 2013 13:27:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E22820353 for ; Thu, 3 Oct 2013 13:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073Ab3JCN1N (ORCPT ); Thu, 3 Oct 2013 09:27:13 -0400 Received: from mail-ea0-f176.google.com ([209.85.215.176]:52093 "EHLO mail-ea0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753840Ab3JCN1L (ORCPT ); Thu, 3 Oct 2013 09:27:11 -0400 Received: by mail-ea0-f176.google.com with SMTP id q16so1100224ead.35 for ; Thu, 03 Oct 2013 06:27:09 -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=ilBSg277rYP8v5LcYfu+N0lEtxtnXgQxdIOZSA/DdfI=; b=cyyUGAGtSg0/HTdkcwgiFfsr2AIQCkMmK1lsE134YUDrOTp3k34gNu3cbKx9xYmR+g bu0yzcFVsls3h9u1PpgQ1g4Yyt1imkCmBMxsq/oHTh7IaRNjtJ8TBXQjnDAakrLC+hZ0 GE+Ahs59nCB2up5fJSC3ZI4KockwQKpA9/ywDRLgcaFr3mFi1K6jKPjySYNEXTQ1ZC8S 5UMV2UCNTa9f1KexyQuwx9hJYPGj5N6jVu2KHE3jpoCkpJqGnslLh7bkUzsOIUNOjVQY g+Vt7qy/OUPvnchGOSch/vEV3f83eJUBmvCJw0R/Ald62W49QZ/FD/afC4Ghiu7k/pVz zQzQ== X-Received: by 10.14.184.132 with SMTP id s4mr12832437eem.13.1380806829306; Thu, 03 Oct 2013 06:27:09 -0700 (PDT) Received: from localhost.localdomain (stgt-5f719fb4.pool.mediaWays.net. [95.113.159.180]) by mx.google.com with ESMTPSA id bn13sm15783337eeb.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 06:27:08 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , David Herrmann Subject: [PATCH] Input: clarify gamepad API ABS values Date: Thu, 3 Oct 2013 15:27:09 +0200 Message-Id: <1380806829-11824-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.4 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.4 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 It wasn't really clear from the gamepad-API description how ABS values are mapped exactly. Clarify that negative is left/up and positive is right/down. Unfortunately, this means I screwed up the Wii U ProController ABI. Anyhow, this just means we continue to have 0 compatible gamepad drivers in the kernel. User-space needs to fix them up, anyway, as all other gamepads are also incompatible. Signed-off-by: David Herrmann --- Documentation/input/gamepad.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/input/gamepad.txt b/Documentation/input/gamepad.txt index 8002c89..31bb6a4 100644 --- a/Documentation/input/gamepad.txt +++ b/Documentation/input/gamepad.txt @@ -122,12 +122,14 @@ D-Pad: BTN_DPAD_* Analog buttons are reported as: ABS_HAT0X and ABS_HAT0Y + (for ABS values negative is left/up, positive is right/down) Analog-Sticks: The left analog-stick is reported as ABS_X, ABS_Y. The right analog stick is reported as ABS_RX, ABS_RY. Zero, one or two sticks may be present. If analog-sticks provide digital buttons, they are mapped accordingly as BTN_THUMBL (first/left) and BTN_THUMBR (second/right). + (for ABS values negative is left/up, positive is right/down) Triggers: Trigger buttons can be available as digital or analog buttons or both. User- @@ -138,6 +140,7 @@ Triggers: ABS_HAT2X (right/ZR) and BTN_TL2 or ABS_HAT2Y (left/ZL). If only one trigger-button combination is present (upper+lower), they are reported as "right" triggers (BTN_TR/ABS_HAT1X). + (ABS trigger values start at 0, pressure is reported as positive values) Menu-Pad: Menu buttons are always digital and are mapped according to their location