Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH 0/3] input: force feedback for trigger rumble motors
@ 2026-07-30  9:53 Guillaume Casal
  2026-07-30  9:53 ` [PATCH 1/3] input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct Guillaume Casal
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Guillaume Casal @ 2026-07-30  9:53 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, dbdaniel42

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@gmail.com/

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(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-30 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  9:53 [PATCH 0/3] input: force feedback for trigger rumble motors Guillaume Casal
2026-07-30  9:53 ` [PATCH 1/3] input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct Guillaume Casal
2026-07-30 10:04   ` sashiko-bot
2026-07-30  9:53 ` [PATCH 2/3] input: ff-memless: Add trigger left/right in ml_combine_effects Guillaume Casal
2026-07-30 10:24   ` sashiko-bot
2026-07-30  9:53 ` [PATCH 3/3] input: Add FF_TRIGGER_RUMBLE capability bit Guillaume Casal
2026-07-30 10:39   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox