• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/input/

Lines Matching refs:effect

35  * Check that the effect_id is a valid effect and whether the user
63 * Convert an effect into compatible one
65 static int compat_effect(struct ff_device *ff, struct ff_effect *effect)
69 switch (effect->type) {
78 magnitude = effect->u.rumble.strong_magnitude / 3 +
79 effect->u.rumble.weak_magnitude / 6;
81 effect->type = FF_PERIODIC;
82 effect->u.periodic.waveform = FF_SINE;
83 effect->u.periodic.period = 50;
84 effect->u.periodic.magnitude = max(magnitude, 0x7fff);
85 effect->u.periodic.offset = 0;
86 effect->u.periodic.phase = 0;
87 effect->u.periodic.envelope.attack_length = 0;
88 effect->u.periodic.envelope.attack_level = 0;
89 effect->u.periodic.envelope.fade_length = 0;
90 effect->u.periodic.envelope.fade_level = 0;
101 * input_ff_upload() - upload effect into force-feedback device
103 * @effect: effect to be uploaded
104 * @file: owner of the effect
106 int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
117 if (effect->type < FF_EFFECT_MIN || effect->type > FF_EFFECT_MAX ||
118 !test_bit(effect->type, dev->ffbit)) {
119 debug("invalid or not supported effect type in upload");
123 if (effect->type == FF_PERIODIC &&
124 (effect->u.periodic.waveform < FF_WAVEFORM_MIN ||
125 effect->u.periodic.waveform > FF_WAVEFORM_MAX ||
126 !test_bit(effect->u.periodic.waveform, dev->ffbit))) {
131 if (!test_bit(effect->type, ff->ffbit)) {
132 ret = compat_effect(ff, effect);
139 if (effect->id == -1) {
149 effect->id = id;
153 id = effect->id;
161 if (!check_effects_compatible(effect, old)) {
167 ret = ff->upload(dev, effect, old);
172 ff->effects[id] = *effect;
183 * Erases the effect if the requester is also the effect owner. The mutex
216 * input_ff_erase - erase a force-feedback effect from device
217 * @dev: input device to erase effect from
221 * This function erases a force-feedback effect from specified device.
222 * The effect will only be erased if it was uploaded through the same
263 * @dev: input device to send the effect to