Skip to content

[FROM-ML] HID: ayaneo: sync to the v4 submission - #123

Merged
KyleGospo merged 1 commit into
OpenGamingCollective:features/ayaneofrom
matmartinez:hid-ayaneo-v4-sync
Sep 30, 2026
Merged

KyleGospo merged 1 commit into
OpenGamingCollective:features/ayaneofrom
matmartinez:hid-ayaneo-v4-sync

Conversation

@matmartinez

@matmartinez matmartinez commented Sep 25, 2026 •

Copy link
Copy Markdown

v4 of the driver is on the list: https://lore.kernel.org/linux-input/20260925061941.75121-1-hello@matias.me/

This syncs the tree's driver to that state as one [FROM-ML] commit carrying the lore Link. Highlights: the firmware rainbow effect via effect/effect_index (found in #122, credited in the v4 changelog), transparent pass-through of the non-vendor interfaces so the driver is safe to ship enabled at boot, the removal-reply fix, rumble_intensity, and a hardened teardown. The driver file matches the sent v4 byte for byte and passed the full hardware matrix on my AYANEO 3, including two eject/reinsert cycles.

Summary by CodeRabbit

  • New Features
    • Added joystick-ring LED effects: monocolor, breathing, and rainbow, with controls for brightness and available effects.
    • Added controls for selecting rumble intensity and viewing supported levels.
    • Improved support for devices that share the same USB identifier by preserving generic HID behavior on non-AYANEO 3 interfaces.
    • Eject operations now allow time for the device’s power-cut step before reporting success.
  • Documentation
    • Updated sysfs documentation for AYANEO controls, LED effects, and rumble settings.

Update the driver to the state submitted as v4: firmware LED effects
through effect/effect_index (monocolor, breathe, rainbow) replacing
the hw_pattern trigger and its ABI document, rumble_intensity plus an
index attribute, transparent pass-through of the non-vendor 1c4f:0002
interfaces with reset_resume mirrored from hid-generic, configuration
reapply after reset, sysfs teardown ordered before the transport with
IO kept enabled, the reply state under a spinlock, and an enforced
minimum eject settle time.

Link: https://lore.kernel.org/r/20260925061941.75121-1-hello@matias.me
Signed-off-by: Matías Martínez <hello@matias.me>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 87a9ea6c-ef97-4675-bad9-0890bafd08bc

📥 Commits

Reviewing files that changed from the base of the PR and between 7f7b9a4 and ccfd321.

📒 Files selected for processing (5)
  • Documentation/ABI/testing/sysfs-class-led-driver-hid-ayaneo
  • Documentation/ABI/testing/sysfs-driver-hid-ayaneo
  • MAINTAINERS
  • drivers/hid/Kconfig
  • drivers/hid/hid-ayaneo.c
💤 Files with no reviewable changes (2)
  • Documentation/ABI/testing/sysfs-class-led-driver-hid-ayaneo
  • MAINTAINERS

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The AYANEO HID driver adds rumble and joystick-ring LED effect controls. It changes command reply handling, eject polling, device matching, and reset-resume behavior. The sysfs ABI documentation and maintainer entry now reference the updated ABI file.

Changes

AYANEO HID driver

Layer / File(s) Summary
Command replies and configuration
drivers/hid/hid-ayaneo.c
Commands accept caller-selected retry counts, and reply matching uses a spinlock. Configuration generation handles the monocolor, breathing, and rainbow LED modes.
Eject, rumble, and LED controls
drivers/hid/hid-ayaneo.c, Documentation/ABI/testing/sysfs-class-led-driver-hid-ayaneo, Documentation/ABI/testing/sysfs-driver-hid-ayaneo, MAINTAINERS
Eject polling uses interruptible waits and a minimum interval. Sysfs attributes expose named rumble levels and LED effects. The ABI documentation describes supported values and rainbow behavior, and the maintainer entry points to the updated ABI file.
Device matching and lifecycle
drivers/hid/hid-ayaneo.c, drivers/hid/Kconfig
The driver handles non-vendor interfaces as transparent generic HID devices and limits AYANEO-specific controls to the AYANEO 3 vendor interface. Probe, removal, and reset-resume manage HID I/O and configuration. The Kconfig help text documents module build instructions.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant LED effect attribute
  participant ayaneo_cmd
  participant HID device
  participant ayaneo_raw_event
  LED effect attribute->>ayaneo_cmd: Apply LED effect configuration
  ayaneo_cmd->>HID device: Send command
  HID device->>ayaneo_raw_event: Deliver command reply
  ayaneo_raw_event->>ayaneo_cmd: Copy matched response
Loading

Merge Risk: ⚪ Minimal · up to ccfd3

No confirmed issue remains that should prevent merging after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 1 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the driver being updated and states that the pull request synchronizes it with the v4 submission, which matches the primary objective and changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 15.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sknowledge1

Copy link
Copy Markdown

Great work! 😊

@matmartinez

Copy link
Copy Markdown
Author

Some real-world motivation for merging this: I updated an AYANEO 3 to the
current stable image (44.20260929, kernel 7.2.7-ogc1.1), which ships the v3
hid-ayaneo from features/ayaneo. On hardware, the v3 driver's -ENODEV for the
non-vendor interfaces leaves them driverless once the driver is present at
boot:

0003:1C4F:0002.0001 (Mouse)    -> NONE
0003:1C4F:0002.0002 (Keyboard) -> NONE
0003:1C4F:0002.0003 (vendor)   -> hid-ayaneo

hid-generic binds them briefly at boot, but any re-enumeration (a module
detach/reattach, a suspend/resume) hands them back to hid-ayaneo via the id
table and they end up unbound, which also destabilises the input stack.

This PR is the v4 sync, whose pass-through claims every interface of the
shared ID and starts the non-vendor ones as transparent generic devices
(HID_QUIRK_INPUT_PER_APP + HID_CONNECT_DEFAULT, mirroring hid-generic
including reset_resume), so the interfaces stay driven across
re-enumeration. It's approved and green — merging it would fix that on the
shipped kernel. Happy to rebase if it's drifted.

@KyleGospo
KyleGospo merged commit 64362f5 into OpenGamingCollective:features/ayaneo Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants