Linux Input/HID development
 help / color / mirror / Atom feed
From: Guillaume Casal <guillaume.casal.42@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	dbdaniel42@gmail.com
Subject: [PATCH 1/3] input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct
Date: Thu, 30 Jul 2026 11:53:15 +0200	[thread overview]
Message-ID: <20260730095317.767418-2-guillaume.casal.42@gmail.com> (raw)
In-Reply-To: <20260730095317.767418-1-guillaume.casal.42@gmail.com>

From: Daniel Bomar <dbdaniel42@gmail.com>

This adds two variables to control the trigger motors to the struct that
is passed in from userspace. This is ABI compatible because it does not
change the total size of the union that contains this struct: the union
is sized by struct ff_periodic_effect, which is larger.

Originally posted in 2022 and never merged:
https://lore.kernel.org/lkml/20220410220449.5071-1-dbdaniel42@gmail.com/

Rebased onto v7.2-rc5 with no functional change; the kernel-doc entries for
the two new members are the only addition.

Signed-off-by: Daniel Bomar <dbdaniel42@gmail.com>
Signed-off-by: Guillaume Casal <guillaume.casal.42@gmail.com>
---
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -420,6 +420,8 @@
  * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect
  * @strong_magnitude: magnitude of the heavy motor
  * @weak_magnitude: magnitude of the light one
+ * @trigger_left: magnitude of the motor behind the left trigger
+ * @trigger_right: magnitude of the motor behind the right trigger
  *
  * Some rumble pads have two motors of different weight. Strong_magnitude
  * represents the magnitude of the vibration generated by the heavy one.
@@ -427,6 +429,8 @@
 struct ff_rumble_effect {
 	__u16 strong_magnitude;
 	__u16 weak_magnitude;
+	__u16 trigger_left;
+	__u16 trigger_right;
 };
 
 /**

  reply	other threads:[~2026-07-30  9:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30  9:53 [PATCH 0/3] input: force feedback for trigger rumble motors Guillaume Casal
2026-07-30  9:53 ` Guillaume Casal [this message]
2026-07-30 10:04   ` [PATCH 1/3] input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260730095317.767418-2-guillaume.casal.42@gmail.com \
    --to=guillaume.casal.42@gmail.com \
    --cc=dbdaniel42@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox