Lines Matching refs:effect
505 struct ff_effect *effect,
514 /* The effect should be uploaded when haptic is not working */
518 switch (effect->type) {
523 tmp = effect->u.constant.level * 254;
528 haptics->gain = effect->u.constant.level <= 0 ?
529 0 : effect->u.constant.level;
534 if (effect->u.periodic.waveform != FF_CUSTOM) {
547 if (effect->u.periodic.custom_len == DA7280_CUSTOM_DATA_LEN)
550 if (effect->u.periodic.custom_len == DA7280_CUSTOM_GP_DATA_LEN)
553 if (effect->u.periodic.custom_len < DA7280_CUSTOM_DATA_LEN ||
554 effect->u.periodic.custom_len > DA7280_SNP_MEM_SIZE) {
559 if (copy_from_user(data, effect->u.periodic.custom_data,
561 effect->u.periodic.custom_len))
566 for (i = 0; i < effect->u.periodic.custom_len; i++) {
585 if (copy_from_user(data, effect->u.periodic.custom_data,
616 if (copy_from_user(data, effect->u.periodic.custom_data,
650 dev_err(haptics->dev, "Unsupported effect type: %d\n",
651 effect->type);