pidff 232 drivers/hid/usbhid/hid-pidff.c static void pidff_set_envelope_report(struct pidff_device *pidff, pidff 235 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 236 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 238 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_ATTACK_LEVEL].value[0] = pidff 241 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_ATTACK_LEVEL].field); pidff 242 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_FADE_LEVEL].value[0] = pidff 245 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_FADE_LEVEL].field); pidff 247 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_ATTACK_TIME].value[0] = envelope->attack_length; pidff 248 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_FADE_TIME].value[0] = envelope->fade_length; pidff 250 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "attack %u => %d\n", pidff 252 drivers/hid/usbhid/hid-pidff.c pidff->set_envelope[PID_ATTACK_LEVEL].value[0]); pidff 254 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE], pidff 273 drivers/hid/usbhid/hid-pidff.c static void pidff_set_constant_force_report(struct pidff_device *pidff, pidff 276 drivers/hid/usbhid/hid-pidff.c pidff->set_constant[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 277 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 278 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE], pidff 281 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT], pidff 297 drivers/hid/usbhid/hid-pidff.c static void pidff_set_effect_report(struct pidff_device *pidff, pidff 300 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 301 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 302 drivers/hid/usbhid/hid-pidff.c pidff->set_effect_type->value[0] = pidff 303 drivers/hid/usbhid/hid-pidff.c pidff->create_new_effect_type->value[0]; pidff 304 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_DURATION].value[0] = effect->replay.length; pidff 305 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = effect->trigger.button; pidff 306 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = pidff 308 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_GAIN].value[0] = pidff 309 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_GAIN].field->logical_maximum; pidff 310 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; pidff 311 drivers/hid/usbhid/hid-pidff.c pidff->effect_direction->value[0] = pidff 313 drivers/hid/usbhid/hid-pidff.c pidff->effect_direction); pidff 314 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; pidff 316 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], pidff 336 drivers/hid/usbhid/hid-pidff.c static void pidff_set_periodic_report(struct pidff_device *pidff, pidff 339 drivers/hid/usbhid/hid-pidff.c pidff->set_periodic[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 340 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 341 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_periodic[PID_MAGNITUDE], pidff 343 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_periodic[PID_OFFSET], pidff 345 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase); pidff 346 drivers/hid/usbhid/hid-pidff.c pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period; pidff 348 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC], pidff 368 drivers/hid/usbhid/hid-pidff.c static void pidff_set_condition_report(struct pidff_device *pidff, pidff 373 drivers/hid/usbhid/hid-pidff.c pidff->set_condition[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 374 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 377 drivers/hid/usbhid/hid-pidff.c pidff->set_condition[PID_PARAM_BLOCK_OFFSET].value[0] = i; pidff 378 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_condition[PID_CP_OFFSET], pidff 380 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_condition[PID_POS_COEFFICIENT], pidff 382 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_condition[PID_NEG_COEFFICIENT], pidff 384 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->set_condition[PID_POS_SATURATION], pidff 386 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->set_condition[PID_NEG_SATURATION], pidff 388 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->set_condition[PID_DEAD_BAND], pidff 390 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], pidff 422 drivers/hid/usbhid/hid-pidff.c static void pidff_set_ramp_force_report(struct pidff_device *pidff, pidff 425 drivers/hid/usbhid/hid-pidff.c pidff->set_ramp[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 426 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 427 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_ramp[PID_RAMP_START], pidff 429 drivers/hid/usbhid/hid-pidff.c pidff_set_signed(&pidff->set_ramp[PID_RAMP_END], pidff 431 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP], pidff 451 drivers/hid/usbhid/hid-pidff.c static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum) pidff 455 drivers/hid/usbhid/hid-pidff.c pidff->create_new_effect_type->value[0] = efnum; pidff 456 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], pidff 458 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); pidff 460 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; pidff 461 drivers/hid/usbhid/hid-pidff.c pidff->block_load_status->value[0] = 0; pidff 462 drivers/hid/usbhid/hid-pidff.c hid_hw_wait(pidff->hid); pidff 465 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "pid_block_load requested\n"); pidff 466 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_LOAD], pidff 468 drivers/hid/usbhid/hid-pidff.c hid_hw_wait(pidff->hid); pidff 469 drivers/hid/usbhid/hid-pidff.c if (pidff->block_load_status->value[0] == pidff 470 drivers/hid/usbhid/hid-pidff.c pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) { pidff 471 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "device reported free memory: %d bytes\n", pidff 472 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_RAM_POOL_AVAILABLE].value ? pidff 473 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_RAM_POOL_AVAILABLE].value[0] : -1); pidff 476 drivers/hid/usbhid/hid-pidff.c if (pidff->block_load_status->value[0] == pidff 477 drivers/hid/usbhid/hid-pidff.c pidff->status_id[PID_BLOCK_LOAD_FULL]) { pidff 478 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "not enough memory free: %d bytes\n", pidff 479 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_RAM_POOL_AVAILABLE].value ? pidff 480 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_RAM_POOL_AVAILABLE].value[0] : -1); pidff 484 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "pid_block_load failed 60 times\n"); pidff 491 drivers/hid/usbhid/hid-pidff.c static void pidff_playback_pid(struct pidff_device *pidff, int pid_id, int n) pidff 493 drivers/hid/usbhid/hid-pidff.c pidff->effect_operation[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; pidff 496 drivers/hid/usbhid/hid-pidff.c pidff->effect_operation_status->value[0] = pidff 497 drivers/hid/usbhid/hid-pidff.c pidff->operation_id[PID_EFFECT_STOP]; pidff 499 drivers/hid/usbhid/hid-pidff.c pidff->effect_operation_status->value[0] = pidff 500 drivers/hid/usbhid/hid-pidff.c pidff->operation_id[PID_EFFECT_START]; pidff 501 drivers/hid/usbhid/hid-pidff.c pidff->effect_operation[PID_LOOP_COUNT].value[0] = n; pidff 504 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], pidff 513 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff = dev->ff->private; pidff 515 drivers/hid/usbhid/hid-pidff.c pidff_playback_pid(pidff, pidff->pid_id[effect_id], value); pidff 523 drivers/hid/usbhid/hid-pidff.c static void pidff_erase_pid(struct pidff_device *pidff, int pid_id) pidff 525 drivers/hid/usbhid/hid-pidff.c pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; pidff 526 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_FREE], pidff 535 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff = dev->ff->private; pidff 536 drivers/hid/usbhid/hid-pidff.c int pid_id = pidff->pid_id[effect_id]; pidff 538 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "starting to erase %d/%d\n", pidff 539 drivers/hid/usbhid/hid-pidff.c effect_id, pidff->pid_id[effect_id]); pidff 542 drivers/hid/usbhid/hid-pidff.c hid_hw_wait(pidff->hid); pidff 543 drivers/hid/usbhid/hid-pidff.c pidff_playback_pid(pidff, pid_id, 0); pidff 544 drivers/hid/usbhid/hid-pidff.c pidff_erase_pid(pidff, pid_id); pidff 555 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff = dev->ff->private; pidff 559 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; pidff 561 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 562 drivers/hid/usbhid/hid-pidff.c pidff->pid_id[effect->id]; pidff 568 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 569 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_CONSTANT]); pidff 574 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 576 drivers/hid/usbhid/hid-pidff.c pidff_set_constant_force_report(pidff, effect); pidff 580 drivers/hid/usbhid/hid-pidff.c pidff_set_envelope_report(pidff, pidff 603 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "invalid waveform\n"); pidff 607 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 608 drivers/hid/usbhid/hid-pidff.c pidff->type_id[type_id]); pidff 613 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 615 drivers/hid/usbhid/hid-pidff.c pidff_set_periodic_report(pidff, effect); pidff 619 drivers/hid/usbhid/hid-pidff.c pidff_set_envelope_report(pidff, pidff 625 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 626 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_RAMP]); pidff 631 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 633 drivers/hid/usbhid/hid-pidff.c pidff_set_ramp_force_report(pidff, effect); pidff 637 drivers/hid/usbhid/hid-pidff.c pidff_set_envelope_report(pidff, pidff 643 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 644 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_SPRING]); pidff 649 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 651 drivers/hid/usbhid/hid-pidff.c pidff_set_condition_report(pidff, effect); pidff 656 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 657 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_FRICTION]); pidff 662 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 664 drivers/hid/usbhid/hid-pidff.c pidff_set_condition_report(pidff, effect); pidff 669 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 670 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_DAMPER]); pidff 675 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 677 drivers/hid/usbhid/hid-pidff.c pidff_set_condition_report(pidff, effect); pidff 682 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, pidff 683 drivers/hid/usbhid/hid-pidff.c pidff->type_id[PID_INERTIA]); pidff 688 drivers/hid/usbhid/hid-pidff.c pidff_set_effect_report(pidff, effect); pidff 690 drivers/hid/usbhid/hid-pidff.c pidff_set_condition_report(pidff, effect); pidff 694 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "invalid type\n"); pidff 699 drivers/hid/usbhid/hid-pidff.c pidff->pid_id[effect->id] = pidff 700 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; pidff 702 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "uploaded\n"); pidff 712 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff = dev->ff->private; pidff 714 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain); pidff 715 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_DEVICE_GAIN], pidff 719 drivers/hid/usbhid/hid-pidff.c static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude) pidff 722 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].field; pidff 725 drivers/hid/usbhid/hid-pidff.c pidff_playback_pid(pidff, field->logical_minimum, 0); pidff 729 drivers/hid/usbhid/hid-pidff.c pidff_playback_pid(pidff, field->logical_minimum, 1); pidff 731 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_EFFECT_BLOCK_INDEX].value[0] = pidff 732 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_minimum; pidff 733 drivers/hid/usbhid/hid-pidff.c pidff->set_effect_type->value[0] = pidff->type_id[PID_SPRING]; pidff 734 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_DURATION].value[0] = 0; pidff 735 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0; pidff 736 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0; pidff 737 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->set_effect[PID_GAIN], magnitude); pidff 738 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; pidff 739 drivers/hid/usbhid/hid-pidff.c pidff->set_effect[PID_START_DELAY].value[0] = 0; pidff 741 drivers/hid/usbhid/hid-pidff.c hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], pidff 750 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff = dev->ff->private; pidff 752 drivers/hid/usbhid/hid-pidff.c pidff_autocenter(pidff, magnitude); pidff 813 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff) pidff 826 drivers/hid/usbhid/hid-pidff.c pidff->reports[ret] = report; pidff 842 drivers/hid/usbhid/hid-pidff.c if (ret != -1 && !pidff->reports[ret]) { pidff 846 drivers/hid/usbhid/hid-pidff.c pidff->reports[ret] = report; pidff 854 drivers/hid/usbhid/hid-pidff.c static int pidff_reports_ok(struct pidff_device *pidff) pidff 859 drivers/hid/usbhid/hid-pidff.c if (!pidff->reports[i]) { pidff 860 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "%d missing\n", i); pidff 914 drivers/hid/usbhid/hid-pidff.c pidff_find_special_keys(pidff->keys, pidff->field, pidff_ ## name, \ pidff 920 drivers/hid/usbhid/hid-pidff.c static int pidff_find_special_fields(struct pidff_device *pidff) pidff 922 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "finding special fields\n"); pidff 924 drivers/hid/usbhid/hid-pidff.c pidff->create_new_effect_type = pidff 925 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_CREATE_NEW_EFFECT], pidff 927 drivers/hid/usbhid/hid-pidff.c pidff->set_effect_type = pidff 928 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_SET_EFFECT], pidff 930 drivers/hid/usbhid/hid-pidff.c pidff->effect_direction = pidff 931 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_SET_EFFECT], pidff 933 drivers/hid/usbhid/hid-pidff.c pidff->device_control = pidff 934 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_DEVICE_CONTROL], pidff 936 drivers/hid/usbhid/hid-pidff.c pidff->block_load_status = pidff 937 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_BLOCK_LOAD], pidff 939 drivers/hid/usbhid/hid-pidff.c pidff->effect_operation_status = pidff 940 drivers/hid/usbhid/hid-pidff.c pidff_find_special_field(pidff->reports[PID_EFFECT_OPERATION], pidff 943 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "search done\n"); pidff 945 drivers/hid/usbhid/hid-pidff.c if (!pidff->create_new_effect_type || !pidff->set_effect_type) { pidff 946 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "effect lists not found\n"); pidff 950 drivers/hid/usbhid/hid-pidff.c if (!pidff->effect_direction) { pidff 951 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "direction field not found\n"); pidff 955 drivers/hid/usbhid/hid-pidff.c if (!pidff->device_control) { pidff 956 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "device control field not found\n"); pidff 960 drivers/hid/usbhid/hid-pidff.c if (!pidff->block_load_status) { pidff 961 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "block load status field not found\n"); pidff 965 drivers/hid/usbhid/hid-pidff.c if (!pidff->effect_operation_status) { pidff 966 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "effect operation field not found\n"); pidff 970 drivers/hid/usbhid/hid-pidff.c pidff_find_special_keys(pidff->control_id, pidff->device_control, pidff 978 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "no effect types found\n"); pidff 985 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, pidff 993 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "effect operation identifiers not found\n"); pidff 1003 drivers/hid/usbhid/hid-pidff.c static int pidff_find_effects(struct pidff_device *pidff, pidff 1009 drivers/hid/usbhid/hid-pidff.c int pidff_type = pidff->type_id[i]; pidff 1010 drivers/hid/usbhid/hid-pidff.c if (pidff->set_effect_type->usage[pidff_type].hid != pidff 1011 drivers/hid/usbhid/hid-pidff.c pidff->create_new_effect_type->usage[pidff_type].hid) { pidff 1012 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, pidff 1018 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_CONSTANT]) pidff 1020 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_RAMP]) pidff 1022 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_SQUARE]) { pidff 1026 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_SINE]) { pidff 1030 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_TRIANGLE]) { pidff 1034 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_SAW_UP]) { pidff 1038 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_SAW_DOWN]) { pidff 1042 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_SPRING]) pidff 1044 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_DAMPER]) pidff 1046 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_INERTIA]) pidff 1048 drivers/hid/usbhid/hid-pidff.c if (pidff->type_id[PID_FRICTION]) pidff 1056 drivers/hid/usbhid/hid-pidff.c pidff_find_fields(pidff->name, pidff_ ## name, \ pidff 1057 drivers/hid/usbhid/hid-pidff.c pidff->reports[report], \ pidff 1063 drivers/hid/usbhid/hid-pidff.c static int pidff_init_fields(struct pidff_device *pidff, struct input_dev *dev) pidff 1068 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "unknown set_effect report layout\n"); pidff 1073 drivers/hid/usbhid/hid-pidff.c if (!pidff->block_load[PID_EFFECT_BLOCK_INDEX].value) { pidff 1074 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "unknown pid_block_load report layout\n"); pidff 1079 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "unknown effect_operation report layout\n"); pidff 1084 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "unknown pid_block_free report layout\n"); pidff 1091 drivers/hid/usbhid/hid-pidff.c if (pidff_find_special_fields(pidff) || pidff_find_effects(pidff, dev)) pidff 1096 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, pidff 1099 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, pidff 1103 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, pidff 1109 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, "unknown constant effect layout\n"); pidff 1115 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, "unknown ramp effect layout\n"); pidff 1124 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, "unknown condition effect layout\n"); pidff 1133 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, "unknown periodic effect layout\n"); pidff 1148 drivers/hid/usbhid/hid-pidff.c static void pidff_reset(struct pidff_device *pidff) pidff 1150 drivers/hid/usbhid/hid-pidff.c struct hid_device *hid = pidff->hid; pidff 1153 drivers/hid/usbhid/hid-pidff.c pidff->device_control->value[0] = pidff->control_id[PID_RESET]; pidff 1155 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); pidff 1157 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); pidff 1160 drivers/hid/usbhid/hid-pidff.c pidff->device_control->value[0] = pidff 1161 drivers/hid/usbhid/hid-pidff.c pidff->control_id[PID_ENABLE_ACTUATORS]; pidff 1162 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); pidff 1166 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT); pidff 1169 drivers/hid/usbhid/hid-pidff.c if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { pidff 1170 drivers/hid/usbhid/hid-pidff.c while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) { pidff 1172 drivers/hid/usbhid/hid-pidff.c hid_warn(pidff->hid, pidff 1174 drivers/hid/usbhid/hid-pidff.c pidff->pool[PID_SIMULTANEOUS_MAX].value[0]); pidff 1177 drivers/hid/usbhid/hid-pidff.c hid_dbg(pidff->hid, "pid_pool requested again\n"); pidff 1178 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_POOL], pidff 1188 drivers/hid/usbhid/hid-pidff.c static int pidff_check_autocenter(struct pidff_device *pidff, pidff 1201 drivers/hid/usbhid/hid-pidff.c error = pidff_request_effect_upload(pidff, 1); pidff 1203 drivers/hid/usbhid/hid-pidff.c hid_err(pidff->hid, "upload request failed\n"); pidff 1207 drivers/hid/usbhid/hid-pidff.c if (pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] == pidff 1208 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_minimum + 1) { pidff 1209 drivers/hid/usbhid/hid-pidff.c pidff_autocenter(pidff, 0xffff); pidff 1212 drivers/hid/usbhid/hid-pidff.c hid_notice(pidff->hid, pidff 1216 drivers/hid/usbhid/hid-pidff.c pidff_erase_pid(pidff, pidff 1217 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]); pidff 1228 drivers/hid/usbhid/hid-pidff.c struct pidff_device *pidff; pidff 1243 drivers/hid/usbhid/hid-pidff.c pidff = kzalloc(sizeof(*pidff), GFP_KERNEL); pidff 1244 drivers/hid/usbhid/hid-pidff.c if (!pidff) pidff 1247 drivers/hid/usbhid/hid-pidff.c pidff->hid = hid; pidff 1251 drivers/hid/usbhid/hid-pidff.c pidff_find_reports(hid, HID_OUTPUT_REPORT, pidff); pidff 1252 drivers/hid/usbhid/hid-pidff.c pidff_find_reports(hid, HID_FEATURE_REPORT, pidff); pidff 1254 drivers/hid/usbhid/hid-pidff.c if (!pidff_reports_ok(pidff)) { pidff 1260 drivers/hid/usbhid/hid-pidff.c error = pidff_init_fields(pidff, dev); pidff 1264 drivers/hid/usbhid/hid-pidff.c pidff_reset(pidff); pidff 1267 drivers/hid/usbhid/hid-pidff.c pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff); pidff 1268 drivers/hid/usbhid/hid-pidff.c hid_hw_request(hid, pidff->reports[PID_DEVICE_GAIN], pidff 1272 drivers/hid/usbhid/hid-pidff.c error = pidff_check_autocenter(pidff, dev); pidff 1277 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_maximum - pidff 1278 drivers/hid/usbhid/hid-pidff.c pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_minimum + pidff 1285 drivers/hid/usbhid/hid-pidff.c if (pidff->pool[PID_SIMULTANEOUS_MAX].value) pidff 1287 drivers/hid/usbhid/hid-pidff.c pidff->pool[PID_SIMULTANEOUS_MAX].value[0]); pidff 1289 drivers/hid/usbhid/hid-pidff.c if (pidff->pool[PID_RAM_POOL_SIZE].value) pidff 1291 drivers/hid/usbhid/hid-pidff.c pidff->pool[PID_RAM_POOL_SIZE].value[0]); pidff 1293 drivers/hid/usbhid/hid-pidff.c if (pidff->pool[PID_DEVICE_MANAGED_POOL].value && pidff 1294 drivers/hid/usbhid/hid-pidff.c pidff->pool[PID_DEVICE_MANAGED_POOL].value[0] == 0) { pidff 1305 drivers/hid/usbhid/hid-pidff.c ff->private = pidff; pidff 1321 drivers/hid/usbhid/hid-pidff.c kfree(pidff);