Thread (25 messages) flat view 25 messages, 2 authors, 5d ago

Re: [PATCH v7 11/12] HID: Map more automobile simulation inputs

From: sashiko-bot@kernel.org
Date: 2026-09-12 03:28:43

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] hid-universal-pidff: Loop boundary hardcodes ABS_BRAKE, missing the newly added ABS_CLUTCH and ABS_SHIFTER axes.
--

commit 5a43f61b9ef2583fea1214cddf577437072e1c07
Author: Vicki Pfau [off-list ref]

HID: Map more automobile simulation inputs

This commit maps the previously ignored HID usages for clutch and shifter 
to ABS_CLUTCH and ABS_SHIFTER in hidinput_configure_usage.
quoted hunk ↗ jump to hunk
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 3487600cadb42..6ade969412c67 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -828,6 +828,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 		case 0xbb: map_abs(ABS_THROTTLE); break;
 		case 0xc4: map_abs(ABS_GAS);      break;
 		case 0xc5: map_abs(ABS_BRAKE);    break;
+		case 0xc6: map_abs(ABS_CLUTCH);   break;
+		case 0xc7: map_abs(ABS_SHIFTER);  break;
[Severity: Medium]
Does this change unintentionally leave the new simulation axes with large
default deadzones on devices handled by the hid-universal-pidff driver?

In drivers/hid/hid-universal-pidff.c, the universal_pidff_input_configured
function explicitly attempts to clear default deadzones for simulation axes
to ensure high precision. However, it relies on a hardcoded loop boundary:

for (axis = ABS_X; axis <= ABS_BRAKE; axis++) {
        ...
}

Since ABS_CLUTCH and ABS_SHIFTER are numerically greater than ABS_BRAKE,
the loop will miss these newly mapped axes. This introduces an unwanted
default deadzone of 1/16th of their range on the clutch and shifter axes,
which might degrade the simulation experience for users of high-end sim
racing wheels.

Should the loop boundary in universal_pidff_input_configured be updated to
include these new axes?
 		case 0xc8: map_abs(ABS_WHEEL);    break;
 		default:   goto ignore;
 		}
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912030426.2997003-1-vi@endrift.com?part=11
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help