Skip to content

Conversation

kakra
Copy link
Collaborator

@kakra kakra commented Feb 22, 2024

This only runs the CI tests on the patch queue. Commits are subject to change, do not base your own work on this.

@kakra kakra force-pushed the queue/for-0.10 branch 6 times, most recently from a8666ca to 12f4608 Compare February 23, 2024 00:39
@kakra kakra force-pushed the queue/for-0.10 branch 4 times, most recently from afd33fa to f61508f Compare March 4, 2024 01:35
@kakra kakra force-pushed the queue/for-0.10 branch 9 times, most recently from dfc5015 to e87d88b Compare December 24, 2024 13:38
@kakra kakra force-pushed the queue/for-0.10 branch 5 times, most recently from bc8b92f to 72e6825 Compare February 8, 2025 17:11
@kakra kakra force-pushed the queue/for-0.10 branch 2 times, most recently from 8dee9da to a402d70 Compare March 18, 2025 23:33
kakra and others added 3 commits October 20, 2025 00:27
`dkms remove` may fail because a previous installation has been broken
or tampered with. This will cause the remaining uninstallation to fail.
Fix this by logging that we proceed anyways.

Suggested-by: flodavid <[email protected]>
Link: atar-axis#563
Signed-off-by: Kai Krakow <[email protected]>
The system should trigger loading of the `uhid` module when `bluetooth`
is loaded to properly support BLE devices which provide the HID bus
from user-space through bluez.

This may still leave a gap for a race-condition if both `bluetooth` and
the BLE device appear at the same time. `uhid` should be present before
any device even connects from user-space, otherwise `hid-xpadneo` may
not see the HID bus early enough.

I'm unsure if we also should provide `weakdep` to trigger inclusion of
`uhid` into initrd - but since Xbox controllers are not critical input
devices during early boot, this is probably not our business. OTOH,
`softdep` may already trigger inclusion on its own (untested).

Hint: This feels wrong because xpadneo is the HID consumer, not the HID
provider. We should not need to do that. But it prevents bug reports
from users in the future.

Tested-by: flodavid <[email protected]>
Link: atar-axis#563 (comment)
Signed-off-by: Kai Krakow <[email protected]>
@kakra kakra requested a review from Copilot October 21, 2025 01:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the xpadneo driver to require kernel 5.12 or higher, removing legacy ERTM (Enhanced Retransmission Mode) workarounds that are no longer needed. It also adds profile switching support and fixes udev rule patterns.

  • Removes ERTM override logic and installation scripts
  • Adds profile button reporting functionality
  • Updates minimum kernel version from 4.18.0 to 5.12.0

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
install.sh Adds warning for unsupported kernel versions below 5.12
hid-xpadneo/src/xpadneo.h Adds profile button macro and last_profile tracking field
hid-xpadneo/src/hid-xpadneo.c Implements profile button registration and reporting
hid-xpadneo/etc-udev-rules.d/70-xpadneo-disable-hidraw.rules Simplifies ACTION pattern to use negation
hid-xpadneo/etc-udev-rules.d/60-xpadneo.rules Simplifies ACTION pattern to use negation
hid-xpadneo/etc-modprobe.d/xpadneo.conf Adds uhid softdep for bluetooth module
hid-xpadneo/dkms.post_remove Removes ERTM logic, updates comment
hid-xpadneo/dkms.post_install Removes ERTM override installation logic
hid-xpadneo/dkms.conf.in Updates minimum kernel version to 5.12.0
Makefile Adds error suppression to dkms remove command
.github/workflows/checkpatch.yml Adds new GitHub workflow for kernel coding style checks

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kakra kakra force-pushed the queue/for-0.10 branch 2 times, most recently from 3d915fa to 25618fe Compare October 21, 2025 03:55
kakra added 8 commits October 21, 2025 05:56
AI checks identified the check being inverted.

Fixes: 25d0ea1 ("xpadneo, installer: Get rid of ERTM work-around by requiring kernel 5.12")
Signed-off-by: Kai Krakow <[email protected]>
Do not leak the error pointer into the battery struct if psy
registration failed.

Signed-off-by: Kai Krakow <[email protected]>
If `ida_simple_get()` fails, we didn't properly bubble up the error to
the device manager.

Signed-off-by: Kai Krakow <[email protected]>
battery.desc.name was never freed during device removal because this
previously caused a kernel crash when xpadneo tried to free the name
itself. Fix this by using the devm memory manager so we don't need to
clean up memory by ourselves.

Also fix input_dev->name which has been an oversight previously.

Signed-off-by: Kai Krakow <[email protected]>
This confuses code analysis.

Signed-off-by: Kai Krakow <[email protected]>
@kakra kakra requested a review from Copilot October 21, 2025 03:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kakra kakra requested a review from Copilot October 21, 2025 04:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kakra kakra requested a review from Copilot October 21, 2025 04:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants