Lines Matching defs:effect
506 struct ff_effect *effect,
515 /* The effect should be uploaded when haptic is not working */
519 switch (effect->type) {
524 tmp = effect->u.constant.level * 254;
529 haptics->gain = effect->u.constant.level <= 0 ?
530 0 : effect->u.constant.level;
535 if (effect->u.periodic.waveform != FF_CUSTOM) {
548 if (effect->u.periodic.custom_len == DA7280_CUSTOM_DATA_LEN)
551 if (effect->u.periodic.custom_len == DA7280_CUSTOM_GP_DATA_LEN)
554 if (effect->u.periodic.custom_len < DA7280_CUSTOM_DATA_LEN ||
555 effect->u.periodic.custom_len > DA7280_SNP_MEM_SIZE) {
560 if (copy_from_user(data, effect->u.periodic.custom_data,
562 effect->u.periodic.custom_len))
567 for (i = 0; i < effect->u.periodic.custom_len; i++) {
586 if (copy_from_user(data, effect->u.periodic.custom_data,
617 if (copy_from_user(data, effect->u.periodic.custom_data,
651 dev_err(haptics->dev, "Unsupported effect type: %d\n",
652 effect->type);