• 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/joystick/iforce/

Lines Matching refs:effect

31  * Set the magnitude of a constant force effect
64 * Upload the component of an effect dealing with the period, phase and magnitude
102 * Uploads the part of an effect setting the envelope of the force
197 * Analyse the changes in an effect, and tell if we need to send an condition
208 dev_warn(&iforce->dev->dev, "bad effect type in %s\n",
225 * Analyse the changes in an effect, and tell if we need to send a magnitude
230 struct ff_effect *effect)
232 if (effect->type != FF_CONSTANT) {
233 dev_warn(&iforce->dev->dev, "bad effect type in %s\n",
238 return old->u.constant.level != effect->u.constant.level;
242 * Analyse the changes in an effect, and tell if we need to send an envelope
246 struct ff_effect *effect)
248 switch (effect->type) {
250 if (old->u.constant.envelope.attack_length != effect->u.constant.envelope.attack_length
251 || old->u.constant.envelope.attack_level != effect->u.constant.envelope.attack_level
252 || old->u.constant.envelope.fade_length != effect->u.constant.envelope.fade_length
253 || old->u.constant.envelope.fade_level != effect->u.constant.envelope.fade_level)
258 if (old->u.periodic.envelope.attack_length != effect->u.periodic.envelope.attack_length
259 || old->u.periodic.envelope.attack_level != effect->u.periodic.envelope.attack_level
260 || old->u.periodic.envelope.fade_length != effect->u.periodic.envelope.fade_length
261 || old->u.periodic.envelope.fade_level != effect->u.periodic.envelope.fade_level)
266 dev_warn(&iforce->dev->dev, "bad effect type in %s\n",
274 * Analyse the changes in an effect, and tell if we need to send a periodic
275 * parameter effect
281 dev_warn(&iforce->dev->dev, "bad effect type in %s\n",
292 * Analyse the changes in an effect, and tell if we need to send an effect
339 /* Stop effect */
344 /* If needed, restart effect */
354 * Upload a periodic effect to the device
357 int iforce_upload_periodic(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
360 int core_id = effect->id;
368 if (!old || need_period_modifier(iforce, old, effect)) {
371 effect->u.periodic.magnitude, effect->u.periodic.offset,
372 effect->u.periodic.period, effect->u.periodic.phase);
378 if (!old || need_envelope_modifier(iforce, old, effect)) {
381 effect->u.periodic.envelope.attack_length,
382 effect->u.periodic.envelope.attack_level,
383 effect->u.periodic.envelope.fade_length,
384 effect->u.periodic.envelope.fade_level);
390 switch (effect->u.periodic.waveform) {
399 if (!old || need_core(old, effect)) {
400 core_err = make_core(iforce, effect->id,
405 effect->replay.length,
406 effect->replay.delay,
407 effect->trigger.button,
408 effect->trigger.interval,
409 effect->direction);
422 * Upload a constant force effect
425 * 0 Ok, effect created or updated
426 * 1 effect did not change since last upload, and no packet was therefore sent
428 int iforce_upload_constant(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
430 int core_id = effect->id;
438 if (!old || need_magnitude_modifier(iforce, old, effect)) {
441 effect->u.constant.level);
447 if (!old || need_envelope_modifier(iforce, old, effect)) {
450 effect->u.constant.envelope.attack_length,
451 effect->u.constant.envelope.attack_level,
452 effect->u.constant.envelope.fade_length,
453 effect->u.constant.envelope.fade_level);
459 if (!old || need_core(old, effect)) {
460 core_err = make_core(iforce, effect->id,
465 effect->replay.length,
466 effect->replay.delay,
467 effect->trigger.button,
468 effect->trigger.interval,
469 effect->direction);
482 * Upload an condition effect. Those are for example friction, inertia, springs...
484 int iforce_upload_condition(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
486 int core_id = effect->id;
494 switch (effect->type) {
500 if (!old || need_condition_modifier(iforce, old, effect)) {
503 effect->u.condition[0].right_saturation,
504 effect->u.condition[0].left_saturation,
505 effect->u.condition[0].right_coeff,
506 effect->u.condition[0].left_coeff,
507 effect->u.condition[0].deadband,
508 effect->u.condition[0].center);
515 effect->u.condition[1].right_saturation,
516 effect->u.condition[1].left_saturation,
517 effect->u.condition[1].right_coeff,
518 effect->u.condition[1].left_coeff,
519 effect->u.condition[1].deadband,
520 effect->u.condition[1].center);
527 if (!old || need_core(old, effect)) {
528 core_err = make_core(iforce, effect->id,
531 effect->replay.length, effect->replay.delay,
532 effect->trigger.button, effect->trigger.interval,
533 effect->direction);