Skip to contentSkip to conversation

input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct

PATCH New Daniel Bomar 1 participant 1 message Apr 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 input: uapi: Add trigger_left and trigger_right to ff_rumble_effect struct

Add 2 variables to the control the trigger motors into the struct that gets passed in from userspace.

ff_rumble_effect is part of a union in ff_effect. This does not grow the total size of the union so should be ABI compatible.

---
 include/uapi/linux/input.h | 4 ++++
 1 file changed, 4 insertions(+)
include/uapi/linux/input.h +4 -0
index ee3127461ee0..d187e00d91a1 100644
@@ -415,6 +415,8 @@ struct ff_periodic_effect {
  * 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.
@@ -422,6 +424,8 @@ struct ff_periodic_effect {
 struct ff_rumble_effect {
 	__u16 strong_magnitude;
 	__u16 weak_magnitude;
+	__u16 trigger_left;
+	__u16 trigger_right;
 };
 
 /**
Signature · 1 line
2.35.1