Skip to content

xpad, hid-sony: Report analog buttons

Max Staudt linux-input lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xpad: XTYPE_XBOX: Report analog buttonsdrivers/input/joystick/xpad.c+29 -02 replies
2/2hid-sony: DS3: Report analog buttons for Sixaxisdrivers/hid/hid-sony.c+50 -163 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] xpad, hid-sony: Report analog buttons

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