Lines Matching refs:ml
112 static void ml_schedule_timer(struct ml_device *ml) in ml_schedule_timer() argument
125 state = &ml->states[i]; in ml_schedule_timer()
142 del_timer(&ml->timer); in ml_schedule_timer()
145 mod_timer(&ml->timer, earliest); in ml_schedule_timer()
326 static int ml_get_combo_effect(struct ml_device *ml, in ml_get_combo_effect() argument
341 state = &ml->states[i]; in ml_get_combo_effect()
355 effect_type = get_compatible_type(ml->dev->ff, effect->type); in ml_get_combo_effect()
383 ml_combine_effects(combo_effect, state, ml->gain); in ml_get_combo_effect()
390 static void ml_play_effects(struct ml_device *ml) in ml_play_effects() argument
397 while (ml_get_combo_effect(ml, handled_bm, &effect)) in ml_play_effects()
398 ml->play_effect(ml->dev, ml->private, &effect); in ml_play_effects()
400 ml_schedule_timer(ml); in ml_play_effects()
405 struct ml_device *ml = from_timer(ml, t, timer); in ml_effect_timer() local
406 struct input_dev *dev = ml->dev; in ml_effect_timer()
412 ml_play_effects(ml); in ml_effect_timer()
421 struct ml_device *ml = dev->ff->private; in ml_ff_set_gain() local
424 ml->gain = gain; in ml_ff_set_gain()
427 __clear_bit(FF_EFFECT_PLAYING, &ml->states[i].flags); in ml_ff_set_gain()
429 ml_play_effects(ml); in ml_ff_set_gain()
437 struct ml_device *ml = dev->ff->private; in ml_ff_playback() local
438 struct ml_effect_state *state = &ml->states[effect_id]; in ml_ff_playback()
460 ml_play_effects(ml); in ml_ff_playback()
468 struct ml_device *ml = dev->ff->private; in ml_ff_upload() local
469 struct ml_effect_state *state = &ml->states[effect->id]; in ml_ff_upload()
480 ml_schedule_timer(ml); in ml_ff_upload()
490 struct ml_device *ml = ff->private; in ml_ff_destroy() local
499 del_timer_sync(&ml->timer); in ml_ff_destroy()
501 kfree(ml->private); in ml_ff_destroy()
513 struct ml_device *ml; in input_ff_create_memless() local
518 ml = kzalloc(sizeof(struct ml_device), GFP_KERNEL); in input_ff_create_memless()
519 if (!ml) in input_ff_create_memless()
522 ml->dev = dev; in input_ff_create_memless()
523 ml->private = data; in input_ff_create_memless()
524 ml->play_effect = play_effect; in input_ff_create_memless()
525 ml->gain = 0xffff; in input_ff_create_memless()
526 timer_setup(&ml->timer, ml_effect_timer, 0); in input_ff_create_memless()
532 kfree(ml); in input_ff_create_memless()
537 ff->private = ml; in input_ff_create_memless()
552 ml->states[i].effect = &ff->effects[i]; in input_ff_create_memless()