From: Max Staudt <max@enpas.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Vicki Pfau <vi@endrift.com>, Pavel Rojtberg <rojtberg@gmail.com>,
Roderick Colenbrander <roderick@gaikai.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] hid-sony: DS3: Report analog buttons for Sixaxis
Date: Wed, 30 Aug 2023 00:53:51 +0900 [thread overview]
Message-ID: <ec4d07de-4944-a7ea-2b74-c4162af75b16@enpas.org> (raw)
In-Reply-To: <20230826152111.13525-3-max@enpas.org>
On 8/27/23 00:21, Max Staudt wrote:
> This change exposes these buttons as axes in a way that is as backwards
> compatible and as close to the Linux gamepad spec as possible.
>
> [...]
>
> - The D-Pad as ABS_HAT0X/ABS_HAT0Y, -255 to 255
One further idea:
The DualShock 3 reports all 4 D-pad buttons separately, and hid-sony currently reports them as discrete digital buttons to userspace.
Would it be better to do the same with the analog buttons, i.e. to report the 4 measurements as discrete axes, rather than the current patch's approach of merging them into two logical axes?
Of course, this would require 4 more axes, this would not fit into any existing scheme, and since we've run out of ABS_MISC+n at this point, this could be a further reason for officially reserving a range of axes for analog buttons. Something like:
#define ABS_BTN_SOUTH 0x40
#define ABS_BTN_A ABS_BTN_SOUTH
#define ABS_BTN_EAST 0x41
#define ABS_BTN_B ABS_BTN_EAST
#define ABS_BTN_C 0x42
#define ABS_BTN_NORTH 0x43
#define ABS_BTN_X ABS_BTN_NORTH
#define ABS_BTN_WEST 0x44
#define ABS_BTN_Y ABS_BTN_WEST
#define ABS_BTN_Z 0x45
#define ABS_BTN_DPAD_UP 0x46
#define ABS_BTN_DPAD_DOWN 0x47
#define ABS_BTN_DPAD_LEFT 0x48
#define ABS_BTN_DPAD_RIGHT 0x49
#define ABS_MAX 0x4f
#define ABS_CNT (ABS_MAX+1)
Max
next prev parent reply other threads:[~2023-08-29 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 15:21 [PATCH 0/2] xpad, hid-sony: Report analog buttons Max Staudt
2023-08-26 15:21 ` [PATCH 1/2] xpad: XTYPE_XBOX: " Max Staudt
2023-08-26 16:52 ` Rahul Rameshbabu
2023-08-27 15:07 ` Max Staudt
2023-08-26 15:21 ` [PATCH 2/2] hid-sony: DS3: Report analog buttons for Sixaxis Max Staudt
2023-08-29 15:53 ` Max Staudt [this message]
2023-09-06 15:45 ` Roderick Colenbrander
2023-09-11 16:51 ` Max Staudt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ec4d07de-4944-a7ea-2b74-c4162af75b16@enpas.org \
--to=max@enpas.org \
--cc=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roderick@gaikai.com \
--cc=rojtberg@gmail.com \
--cc=vi@endrift.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®