From patchwork Sat Aug 26 15:21:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Staudt X-Patchwork-Id: 13366608 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55B01C83F11 for ; Sat, 26 Aug 2023 15:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229620AbjHZPdX (ORCPT ); Sat, 26 Aug 2023 11:33:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjHZPcw (ORCPT ); Sat, 26 Aug 2023 11:32:52 -0400 X-Greylist: delayed 448 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 26 Aug 2023 08:32:49 PDT Received: from mail.enpas.org (zhong.enpas.org [IPv6:2a03:4000:2:537::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6C6710C for ; Sat, 26 Aug 2023 08:32:49 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id A9C0C10071F; Sat, 26 Aug 2023 15:25:13 +0000 (UTC) From: Max Staudt To: Dmitry Torokhov , Jiri Kosina , Benjamin Tissoires Cc: Vicki Pfau , Pavel Rojtberg , Roderick Colenbrander , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt Subject: [PATCH 0/2] xpad, hid-sony: Report analog buttons Date: Sun, 27 Aug 2023 00:21:09 +0900 Message-Id: <20230826152111.13525-1-max@enpas.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Dear input maintainers, I would like to add support for pressure sensitive buttons on the original Xbox gamepad, as well as the PlayStation 3 controllers. In an attempt to maximise backwards compatibility, the attached patches add the corresponding analog values for BTN_A..BTN_Z as ABS_MISC+0..+5, L1/R1 as ABS_HAT1Y/HAT1X, and the D-Pad as ABS_HAT0X/Y. All of these axes have higher indices than any axes previously exposed, so gamepad mappings in SDL keep working. Also, where possible, I have stuck to the Linux gamepad specification (for HAT0/HAT1). Now, I am wondering what best to do with the action buttons, since the Linux gamepad specification does not foresee them being analog. In the patches, they are reported as ABS_MISC+0..+5 - do you think this is reasonable, or would a new ABS_* range at 0x40.. be better suited to this task? I'd appreciate your thoughts on the patches and on how to best add analog buttons to the drivers! Thanks, Max Patches included: [PATCH 1/2] xpad: XTYPE_XBOX: Report analog buttons [PATCH 2/2] hid-sony: DS3: Report analog buttons for Sixaxis