Skip to content

HID: hid-oxp: fix and extend X2-family controller support

Andrei Aldea linux-api linux-input linux-leds lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15HID: hid-oxp: fix default M1 and M2 key mappingsdrivers/hid/hid-oxp.c+2 -21 reply
2/15HID: hid-oxp: validate input report lengths before decodingdrivers/hid/hid-oxp.c+10 -11 reply
3/15HID: hid-oxp: retain fractional brightness when reading RGB statusdrivers/hid/hid-oxp.c+4 -41 reply
4/15HID: hid-oxp: reject invalid Gen2 RGB status valuesdrivers/hid/hid-oxp.c+4 -01 reply
5/15HID: hid-oxp: fix multicolor LED intensity scalingdrivers/hid/hid-oxp.c+7 -41 reply
6/15HID: hid-oxp: serialize complete RGB updatesdrivers/hid/hid-oxp.c+12 -01 reply
7/15HID: hid-oxp: select brightness policy for the new RGB effectdrivers/hid/hid-oxp.c+9 -21 reply
8/15HID: hid-oxp: stop configuration work during teardowndrivers/hid/hid-oxp.c+77 -171 reply
9/15HID: hid-oxp: keep configuration state per HID interfacedrivers/hid/hid-oxp.c+279 -2191 reply
10/15HID: hid-oxp: handle controller reinitialization across suspenddrivers/hid/hid-oxp.c+107 -91 reply
11/15HID: hid-oxp: group declarations and protocol definitionsdrivers/hid/hid-oxp.c+60 -561 reply
12/15HID: hid-oxp: support three-page button maps on X2 controllersdrivers/hid/hid-oxp.c+79 -151 reply
13/15HID: hid-oxp: represent RGB LEDs with a common arraydrivers/hid/hid-oxp.c+297 -1361 reply
14/15HID: hid-oxp: add Gen3 joystick ring RGB supportdrivers/hid/hid-oxp.c+398 -661 reply
15/15HID: hid-oxp: add X2 auxiliary RGB zonesDocumentation/ABI/testing/sysfs-driver-hid-oxp MAINTAINERS drivers/hid/hid-oxp.c+497 -51 reply

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchDerek J. Clark
1/15R-b R-b
2/15R-b T-b R-b
3/15R-b T-b R-b
4/15R-b R-b
5/15R-b T-b R-b
6/15R-b T-b R-b
7/15R-b T-b R-b
8/15R-b T-b R-b
9/15R-b T-b R-b
10/15R-b T-b R-b
11/15R-b T-b R-b
12/15R-b R-b
13/15R-b T-b R-b
14/15R-b R-b
15/15R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/15] HID: hid-oxp: fix and extend X2-family controller support

This 15-patch series fixes existing hid-oxp configuration and RGB issues and adds controller and lighting support for ONEXPLAYER X2-family devices, including the ONEXPLAYER 3 and X2 Mini Pro.

The fixes correct the M1/M2 defaults, validate input reports and RGB state, correct brightness and color scaling, serialize RGB updates, and make configuration state and delayed-work lifetime local to each HID interface. They also handle controller reinitialization across system suspend.

The X2 support selects configuration interface 2, supplies the required three-page button map, and adds the Gen3 protocol for joystick-ring zones 1, 2 and 7. The Guide button and rear logo receive independent multicolor LED devices using zones 5 and 6, with monocolor and breathing effects. The final patch documents the controller and lighting sysfs ABI.

Patches 1-10 contain behavioral fixes. Patch 11 groups existing declarations. Patch 12 adds X2 button maps and interface selection; patch 13 provides the shared LED representation; patches 14-15 add X2 lighting support.

This series is based on mainline commit
50d05c7c76c96b90462f24debacca971d2e86713.

Testing:

I tested this series on an ONEXPLAYER 3 running Bazzite 44 with kernel 7.2.0-ogc6.1.fc44.x86_64. Testing covered front controls, rear paddles, Steam and Quick Access behavior, independent RGB effects, brightness/off controls, and suspend/resume restoration. I also built the module with W=1. X2 Mini Pro hardware testing remains outstanding.

All 15 patches apply cleanly to the stated base and pass git diff --check and checkpatch.pl with zero errors and zero warnings.

Development and review:
https://github.com/OpenGamingCollective/linux-unstable/pull/13

I used LLM assistance for protocol analysis, implementation, documentation, code review, and test orchestration.

Andrei Aldea (15):
HID: hid-oxp: fix default M1 and M2 key mappings
HID: hid-oxp: validate input report lengths before decoding
HID: hid-oxp: retain fractional brightness when reading RGB status
HID: hid-oxp: reject invalid Gen2 RGB status values
HID: hid-oxp: fix multicolor LED intensity scaling
HID: hid-oxp: serialize complete RGB updates
HID: hid-oxp: select brightness policy for the new RGB effect
HID: hid-oxp: stop configuration work during teardown
HID: hid-oxp: keep configuration state per HID interface
HID: hid-oxp: handle controller reinitialization across suspend
HID: hid-oxp: group declarations and protocol definitions
HID: hid-oxp: support three-page button maps on X2 controllers
HID: hid-oxp: represent RGB LEDs with a common array
HID: hid-oxp: add Gen3 joystick ring RGB support
HID: hid-oxp: add X2 auxiliary RGB zones

 .../ABI/testing/sysfs-driver-hid-oxp          |  196 ++
 MAINTAINERS                                   |    1 +
 drivers/hid/hid-oxp.c                         | 1743 ++++++++++++++---
 3 files changed, 1623 insertions(+), 317 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-oxp

base-commit: 50d05c7c76c96b90462f24debacca971d2e86713