Thread (23 messages) flat view 23 messages, 2 authors, 14d ago

Re: [PATCH v6 10/12] Input: Add ABS_CLUTCH, HANDBRAKE, and SHIFTER

From: sashiko-bot@kernel.org
Date: 2026-09-08 03:44:09

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The deadzone and fuzz reduction loop in the universal force-feedback driver hardcodes its upper bound to ABS_BRAKE, failing to include the newly added racing axes.
--

commit 87216a5e9d2ce889923252443994d20643f1c840
Author: Vicki Pfau [off-list ref]

Input: Add ABS_CLUTCH, HANDBRAKE, and SHIFTER

This commit adds new absolute axes for racing game controllers.
quoted hunk ↗ jump to hunk
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 3528168f7c6d7..5c881ed441771 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -879,6 +879,9 @@
 #define ABS_WHEEL		0x08
 #define ABS_GAS			0x09
 #define ABS_BRAKE		0x0a
+#define ABS_CLUTCH		0x0b
+#define ABS_HANDBRAKE		0x0c
+#define ABS_SHIFTER		0x0d
[Severity: Medium]
Will these newly added racing axes be excluded from the deadzone and fuzz
adjustments in the generic PID force-feedback driver?

Looking at universal_pidff_input_configured() in
drivers/hid/hid-universal-pidff.c:

	/* Decrease fuzz and deadzone on available axes */
	for (axis = ABS_X; axis <= ABS_BRAKE; axis++) {
		if (!test_bit(axis, input->absbit))
			continue;

		input_set_abs_params(input, axis, input->absinfo[axis].minimum,
				     input->absinfo[axis].maximum,
				     axis == ABS_X ? 0 : 8, 0);
	}

Since this loop hardcodes its upper bound to ABS_BRAKE, it appears ABS_CLUTCH,
ABS_HANDBRAKE, and ABS_SHIFTER will be skipped.

Consequently, these inputs would fall back to default HID core deadzone
calculations, which might result in inconsistent behavior and unwanted
deadzones compared to the gas and brake pedals which explicitly receive
a deadzone of 0.

Should this loop's upper bound be updated to include the new axes?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908032145.2118234-1-vi@endrift.com?part=10
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help