• Home
  • Raw
  • Download

Lines Matching refs:effect

51 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()
73 effect->u.periodic.envelope.attack_length = 0; in compat_effect()
74 effect->u.periodic.envelope.attack_level = 0; in compat_effect()
75 effect->u.periodic.envelope.fade_length = 0; in compat_effect()
76 effect->u.periodic.envelope.fade_level = 0; in compat_effect()
92 int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, in input_ff_upload() argument
103 if (effect->type < FF_EFFECT_MIN || effect->type > FF_EFFECT_MAX || in input_ff_upload()
104 !test_bit(effect->type, dev->ffbit)) { in input_ff_upload()
109 if (effect->type == FF_PERIODIC && in input_ff_upload()
110 (effect->u.periodic.waveform < FF_WAVEFORM_MIN || in input_ff_upload()
111 effect->u.periodic.waveform > FF_WAVEFORM_MAX || in input_ff_upload()
112 !test_bit(effect->u.periodic.waveform, dev->ffbit))) { in input_ff_upload()
117 if (!test_bit(effect->type, ff->ffbit)) { in input_ff_upload()
118 ret = compat_effect(ff, effect); in input_ff_upload()
125 if (effect->id == -1) { in input_ff_upload()
135 effect->id = id; in input_ff_upload()
139 id = effect->id; in input_ff_upload()
147 if (!check_effects_compatible(effect, old)) { in input_ff_upload()
153 ret = ff->upload(dev, effect, old); in input_ff_upload()
158 ff->effects[id] = *effect; in input_ff_upload()