Home
last modified time | relevance | path

Searched refs:effect (Results 1 – 25 of 68) sorted by relevance

123

/drivers/input/joystick/iforce/
Diforce-ff.c211 struct ff_effect *effect) in need_magnitude_modifier() argument
213 if (effect->type != FF_CONSTANT) { in need_magnitude_modifier()
219 return old->u.constant.level != effect->u.constant.level; in need_magnitude_modifier()
227 struct ff_effect *effect) in need_envelope_modifier() argument
229 switch (effect->type) { in need_envelope_modifier()
231 if (old->u.constant.envelope.attack_length != effect->u.constant.envelope.attack_length in need_envelope_modifier()
232 || old->u.constant.envelope.attack_level != effect->u.constant.envelope.attack_level in need_envelope_modifier()
233 || old->u.constant.envelope.fade_length != effect->u.constant.envelope.fade_length in need_envelope_modifier()
234 || old->u.constant.envelope.fade_level != effect->u.constant.envelope.fade_level) in need_envelope_modifier()
239 if (old->u.periodic.envelope.attack_length != effect->u.periodic.envelope.attack_length in need_envelope_modifier()
[all …]
Diforce-main.c106 static int iforce_upload_effect(struct input_dev *dev, struct ff_effect *effect, struct ff_effect *… in iforce_upload_effect() argument
109 struct iforce_core_effect *core_effect = &iforce->core_effects[effect->id]; in iforce_upload_effect()
121 switch (effect->type) { in iforce_upload_effect()
123 ret = iforce_upload_periodic(iforce, effect, old); in iforce_upload_effect()
127 ret = iforce_upload_constant(iforce, effect, old); in iforce_upload_effect()
132 ret = iforce_upload_condition(iforce, effect, old); in iforce_upload_effect()
/drivers/input/
Dff-memless.c39 struct ff_effect *effect; member
55 struct ff_effect *effect);
58 static const struct ff_envelope *get_envelope(const struct ff_effect *effect) in get_envelope() argument
62 switch (effect->type) { in get_envelope()
64 return &effect->u.periodic.envelope; in get_envelope()
67 return &effect->u.constant.envelope; in get_envelope()
79 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time()
90 if (state->effect->replay.length) { in calculate_next_time()
155 struct ff_effect *effect = state->effect; in apply_envelope() local
171 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
[all …]
Dff-core.c51 static int compat_effect(struct ff_device *ff, struct ff_effect *effect) in compat_effect() argument
55 switch (effect->type) { in compat_effect()
64 magnitude = effect->u.rumble.strong_magnitude / 3 + in compat_effect()
65 effect->u.rumble.weak_magnitude / 6; in compat_effect()
67 effect->type = FF_PERIODIC; in compat_effect()
68 effect->u.periodic.waveform = FF_SINE; in compat_effect()
69 effect->u.periodic.period = 50; in compat_effect()
70 effect->u.periodic.magnitude = max(magnitude, 0x7fff); in compat_effect()
71 effect->u.periodic.offset = 0; in compat_effect()
72 effect->u.periodic.phase = 0; in compat_effect()
[all …]
Dinput-compat.c63 struct ff_effect *effect) in input_ff_effect_from_user() argument
76 compat_effect = (struct ff_effect_compat *)effect; in input_ff_effect_from_user()
84 effect->u.periodic.custom_data = in input_ff_effect_from_user()
90 if (copy_from_user(effect, buffer, sizeof(struct ff_effect))) in input_ff_effect_from_user()
118 struct ff_effect *effect) in input_ff_effect_from_user() argument
123 if (copy_from_user(effect, buffer, sizeof(struct ff_effect))) in input_ff_effect_from_user()
/drivers/hid/usbhid/
Dhid-pidff.c274 struct ff_effect *effect) in pidff_set_constant_force_report() argument
279 effect->u.constant.level); in pidff_set_constant_force_report()
288 static int pidff_needs_set_constant(struct ff_effect *effect, in pidff_needs_set_constant() argument
291 return effect->u.constant.level != old->u.constant.level; in pidff_needs_set_constant()
298 struct ff_effect *effect) in pidff_set_effect_report() argument
304 pidff->set_effect[PID_DURATION].value[0] = effect->replay.length; in pidff_set_effect_report()
305 pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = effect->trigger.button; in pidff_set_effect_report()
307 effect->trigger.interval; in pidff_set_effect_report()
312 pidff_rescale(effect->direction, 0xffff, in pidff_set_effect_report()
314 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; in pidff_set_effect_report()
[all …]
/drivers/hid/
Dhid-logitech-hidpp.c1845 static int hidpp_ff_upload_effect(struct input_dev *dev, struct ff_effect *effect, struct ff_effect… in hidpp_ff_upload_effect() argument
1853 params[2] = effect->replay.length >> 8; in hidpp_ff_upload_effect()
1854 params[3] = effect->replay.length & 255; in hidpp_ff_upload_effect()
1855 params[4] = effect->replay.delay >> 8; in hidpp_ff_upload_effect()
1856 params[5] = effect->replay.delay & 255; in hidpp_ff_upload_effect()
1858 switch (effect->type) { in hidpp_ff_upload_effect()
1860 force = (effect->u.constant.level * fixp_sin16((effect->direction * 360) >> 16)) >> 15; in hidpp_ff_upload_effect()
1864 params[8] = effect->u.constant.envelope.attack_level >> 7; in hidpp_ff_upload_effect()
1865 params[9] = effect->u.constant.envelope.attack_length >> 8; in hidpp_ff_upload_effect()
1866 params[10] = effect->u.constant.envelope.attack_length & 255; in hidpp_ff_upload_effect()
[all …]
Dhid-lgff.c57 static int hid_lgff_play(struct input_dev *dev, void *data, struct ff_effect *effect) in hid_lgff_play() argument
67 switch (effect->type) { in hid_lgff_play()
69 x = effect->u.ramp.start_level + 0x7f; /* 0x7f is center */ in hid_lgff_play()
70 y = effect->u.ramp.end_level + 0x7f; in hid_lgff_play()
82 right = effect->u.rumble.strong_magnitude; in hid_lgff_play()
83 left = effect->u.rumble.weak_magnitude; in hid_lgff_play()
Dhid-tmff.c74 struct ff_effect *effect) in tmff_play() argument
83 switch (effect->type) { in tmff_play()
85 x = tmff_scale_s8(effect->u.ramp.start_level, in tmff_play()
88 y = tmff_scale_s8(effect->u.ramp.end_level, in tmff_play()
99 left = tmff_scale_u16(effect->u.rumble.weak_magnitude, in tmff_play()
102 right = tmff_scale_u16(effect->u.rumble.strong_magnitude, in tmff_play()
Dhid-lg3ff.c49 struct ff_effect *effect) in hid_lg3ff_play() argument
63 switch (effect->type) { in hid_lg3ff_play()
69 x = effect->u.ramp.start_level; in hid_lg3ff_play()
70 y = effect->u.ramp.end_level; in hid_lg3ff_play()
Dhid-lg2ff.c23 struct ff_effect *effect) in play_effect() argument
29 strong = effect->u.rumble.strong_magnitude; in play_effect()
30 weak = effect->u.rumble.weak_magnitude; in play_effect()
Dhid-zpff.c26 struct ff_effect *effect) in zpff_play() argument
38 left = effect->u.rumble.strong_magnitude; in zpff_play()
39 right = effect->u.rumble.weak_magnitude; in zpff_play()
Dhid-betopff.c38 struct ff_effect *effect) in hid_betopff_play() argument
44 left = effect->u.rumble.strong_magnitude; in hid_betopff_play()
45 right = effect->u.rumble.weak_magnitude; in hid_betopff_play()
Dhid-holtekff.c91 struct ff_effect *effect) in holtekff_play() argument
100 left = effect->u.rumble.strong_magnitude; in holtekff_play()
101 right = effect->u.rumble.weak_magnitude; in holtekff_play()
Dhid-mf.c34 static int mf_play(struct input_dev *dev, void *data, struct ff_effect *effect) in mf_play() argument
40 strong = effect->u.rumble.strong_magnitude; in mf_play()
41 weak = effect->u.rumble.weak_magnitude; in mf_play()
Dhid-emsff.c23 struct ff_effect *effect) in emsff_play() argument
29 weak = effect->u.rumble.weak_magnitude; in emsff_play()
30 strong = effect->u.rumble.strong_magnitude; in emsff_play()
Dhid-sjoy.c30 struct ff_effect *effect) in hid_sjoyff_play() argument
36 left = effect->u.rumble.strong_magnitude; in hid_sjoyff_play()
37 right = effect->u.rumble.weak_magnitude; in hid_sjoyff_play()
Dhid-bigbenff.c221 struct ff_effect *effect) in hid_bigben_play_effect() argument
227 if (effect->type != FF_RUMBLE) in hid_bigben_play_effect()
230 right_motor_on = effect->u.rumble.weak_magnitude ? 1 : 0; in hid_bigben_play_effect()
231 left_motor_force = effect->u.rumble.strong_magnitude / 256; in hid_bigben_play_effect()
Dhid-axff.c31 static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect) in axff_play() argument
40 left = effect->u.rumble.strong_magnitude; in axff_play()
41 right = effect->u.rumble.weak_magnitude; in axff_play()
/drivers/input/misc/
Darizona-haptics.c109 struct ff_effect *effect) in arizona_haptics_play() argument
119 if (effect->u.rumble.strong_magnitude) { in arizona_haptics_play()
123 effect->u.rumble.strong_magnitude >> 9; in arizona_haptics_play()
124 if (effect->direction < 0x8000) in arizona_haptics_play()
128 effect->u.rumble.strong_magnitude >> 8; in arizona_haptics_play()
Duinput.c49 struct ff_effect *effect; member
235 struct ff_effect *effect, in uinput_dev_upload_effect() argument
248 if (effect->type == FF_PERIODIC && in uinput_dev_upload_effect()
249 effect->u.periodic.waveform == FF_CUSTOM) in uinput_dev_upload_effect()
253 request.u.upload.effect = effect; in uinput_dev_upload_effect()
719 struct ff_effect_compat effect; member
737 memcpy(&ff_up_compat.effect, &ff_up->effect, in uinput_ff_upload_to_user()
766 memcpy(&ff_up->effect, &ff_up_compat.effect, in uinput_ff_upload_from_user()
945 !req->u.upload.effect) { in uinput_ioctl_handler()
951 ff_up.effect = *req->u.upload.effect; in uinput_ioctl_handler()
[all …]
Dtwl4030-vibra.c123 struct ff_effect *effect) in vibra_play() argument
127 info->speed = effect->u.rumble.strong_magnitude >> 8; in vibra_play()
129 info->speed = effect->u.rumble.weak_magnitude >> 9; in vibra_play()
130 info->direction = effect->direction < EFFECT_DIR_180_DEG ? 0 : 1; in vibra_play()
Dmsm-vibrator.c128 struct ff_effect *effect) in msm_vibrator_play_effect() argument
134 if (effect->u.rumble.strong_magnitude > 0) in msm_vibrator_play_effect()
135 vibrator->magnitude = effect->u.rumble.strong_magnitude; in msm_vibrator_play_effect()
137 vibrator->magnitude = effect->u.rumble.weak_magnitude; in msm_vibrator_play_effect()
Ddrv2667.c227 struct ff_effect *effect) in drv2667_haptics_play() argument
231 if (effect->u.rumble.strong_magnitude > 0) in drv2667_haptics_play()
232 haptics->magnitude = effect->u.rumble.strong_magnitude; in drv2667_haptics_play()
233 else if (effect->u.rumble.weak_magnitude > 0) in drv2667_haptics_play()
234 haptics->magnitude = effect->u.rumble.weak_magnitude; in drv2667_haptics_play()
/drivers/media/platform/exynos4-is/
Dfimc-core.c461 struct fimc_effect *effect = &ctx->effect; in fimc_set_color_effect() local
465 effect->type = FIMC_REG_CIIMGEFF_FIN_BYPASS; in fimc_set_color_effect()
468 effect->type = FIMC_REG_CIIMGEFF_FIN_ARBITRARY; in fimc_set_color_effect()
469 effect->pat_cb = 128; in fimc_set_color_effect()
470 effect->pat_cr = 128; in fimc_set_color_effect()
473 effect->type = FIMC_REG_CIIMGEFF_FIN_ARBITRARY; in fimc_set_color_effect()
474 effect->pat_cb = 115; in fimc_set_color_effect()
475 effect->pat_cr = 145; in fimc_set_color_effect()
478 effect->type = FIMC_REG_CIIMGEFF_FIN_NEGATIVE; in fimc_set_color_effect()
481 effect->type = FIMC_REG_CIIMGEFF_FIN_EMBOSSING; in fimc_set_color_effect()
[all …]

123