Lines Matching refs:effect
506 struct ff_effect *effect, in da7280_haptics_upload_effect() argument
519 switch (effect->type) { in da7280_haptics_upload_effect()
524 tmp = effect->u.constant.level * 254; in da7280_haptics_upload_effect()
529 haptics->gain = effect->u.constant.level <= 0 ? in da7280_haptics_upload_effect()
530 0 : effect->u.constant.level; in da7280_haptics_upload_effect()
535 if (effect->u.periodic.waveform != FF_CUSTOM) { in da7280_haptics_upload_effect()
548 if (effect->u.periodic.custom_len == DA7280_CUSTOM_DATA_LEN) in da7280_haptics_upload_effect()
551 if (effect->u.periodic.custom_len == DA7280_CUSTOM_GP_DATA_LEN) in da7280_haptics_upload_effect()
554 if (effect->u.periodic.custom_len < DA7280_CUSTOM_DATA_LEN || in da7280_haptics_upload_effect()
555 effect->u.periodic.custom_len > DA7280_SNP_MEM_SIZE) { in da7280_haptics_upload_effect()
560 if (copy_from_user(data, effect->u.periodic.custom_data, in da7280_haptics_upload_effect()
562 effect->u.periodic.custom_len)) in da7280_haptics_upload_effect()
567 for (i = 0; i < effect->u.periodic.custom_len; i++) { in da7280_haptics_upload_effect()
586 if (copy_from_user(data, effect->u.periodic.custom_data, in da7280_haptics_upload_effect()
617 if (copy_from_user(data, effect->u.periodic.custom_data, in da7280_haptics_upload_effect()
652 effect->type); in da7280_haptics_upload_effect()