[PATCH 0/3] input: force feedback for trigger rumble motors
From: Guillaume Casal
Date: Thu Jul 30 2026 - 06:13:19 EST
Some gamepads carry rumble motors behind their triggers, in addition to
the usual two in the grips: Xbox controllers call them impulse triggers,
and handhelds such as the ASUS ROG Xbox Ally X have them too. The force
feedback API cannot reach those motors, because struct ff_rumble_effect
only carries a strong and a weak magnitude.
The first two patches are Daniel Bomar's, posted in April 2022 and never
merged:
https://lore.kernel.org/lkml/20220410220449.5071-1-dbdaniel42@xxxxxxxxx/
They add trigger_left and trigger_right to struct ff_rumble_effect and
carry them through ff-memless. I have rebased them onto v7.2-rc5 with no
functional change and kept his authorship.
The third patch is new and addresses what I believe was the main gap in
that series: there was no way for userspace to discover whether a device
has trigger motors at all. It adds an FF_TRIGGER_RUMBLE capability bit
that drivers advertise and applications test in the EVIOCGBIT(EV_FF)
bitmap.
On ABI: struct ff_rumble_effect lives in a union sized by the larger
struct ff_periodic_effect, so the two new members add no size. On an
x86_64 build, struct ff_effect stays at 48 bytes and the union at 32,
of which the extended rumble struct uses 8.
Testing. I ran this on an ASUS ROG Xbox Ally X (USB 0b05:1b4c) under
SteamOS, kernel 6.16.12, where the patches apply unchanged. A memless
test device advertising the capability shows bit 0x62 in its
EVIOCGBIT(EV_FF) bitmap, and the four magnitudes arrive at the driver
independently:
triggers only : strong= 0 weak= 0 trigger_left=65535 trigger_right=65535
grips only : strong=65535 weak=65535 trigger_left= 0 trigger_right= 0
left trigger : strong= 0 weak= 0 trigger_left=65535 trigger_right= 0
right trigger : strong= 0 weak= 0 trigger_left= 0 trigger_right=65535
Wired into that handheld's HID driver, this drives the four actuators
separately on real hardware: the triggers buzz while the grips stay
silent, confirmed both by feel and by capturing the USB traffic. That
driver is not in mainline, so its patch is not part of this series; I
will send it to its maintainers separately.
To be explicit about what was and was not tested: on v7.2-rc5 the series
applies cleanly, drivers/input/ff-memless.o builds, and checkpatch.pl
reports no warnings, but I have not booted that kernel. The runtime
testing described above was done on 6.16.12, where the affected code is
identical.
Daniel Bomar (2):
input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct
input: ff-memless: Add trigger left/right in ml_combine_effects
Guillaume Casal (1):
input: Add FF_TRIGGER_RUMBLE capability bit
drivers/input/ff-memless.c | 8 +++++++-
include/uapi/linux/input.h | 5 +++++
2 files changed, 12 insertions(+), 1 deletion(-)