aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hid-pidff.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/hid-pidff.c')
-rw-r--r--drivers/usb/input/hid-pidff.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/usb/input/hid-pidff.c b/drivers/usb/input/hid-pidff.c
index b4caea3864e3..cbd2d53fefff 100644
--- a/drivers/usb/input/hid-pidff.c
+++ b/drivers/usb/input/hid-pidff.c
@@ -262,7 +262,7 @@ static void pidff_set_envelope_report(struct pidff_device *pidff,
262 debug("attack %u => %d", envelope->attack_level, 262 debug("attack %u => %d", envelope->attack_level,
263 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]); 263 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]);
264 264
265 hid_submit_report(pidff->hid, pidff->reports[PID_SET_ENVELOPE], 265 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_ENVELOPE],
266 USB_DIR_OUT); 266 USB_DIR_OUT);
267} 267}
268 268
@@ -289,7 +289,7 @@ static void pidff_set_constant_force_report(struct pidff_device *pidff,
289 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE], 289 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE],
290 effect->u.constant.level); 290 effect->u.constant.level);
291 291
292 hid_submit_report(pidff->hid, pidff->reports[PID_SET_CONSTANT], 292 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONSTANT],
293 USB_DIR_OUT); 293 USB_DIR_OUT);
294} 294}
295 295
@@ -324,7 +324,7 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
324 pidff->effect_direction); 324 pidff->effect_direction);
325 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; 325 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay;
326 326
327 hid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 327 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT],
328 USB_DIR_OUT); 328 USB_DIR_OUT);
329} 329}
330 330
@@ -356,7 +356,7 @@ static void pidff_set_periodic_report(struct pidff_device *pidff,
356 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase); 356 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase);
357 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period; 357 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period;
358 358
359 hid_submit_report(pidff->hid, pidff->reports[PID_SET_PERIODIC], 359 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_PERIODIC],
360 USB_DIR_OUT); 360 USB_DIR_OUT);
361 361
362} 362}
@@ -398,8 +398,8 @@ static void pidff_set_condition_report(struct pidff_device *pidff,
398 effect->u.condition[i].left_saturation); 398 effect->u.condition[i].left_saturation);
399 pidff_set(&pidff->set_condition[PID_DEAD_BAND], 399 pidff_set(&pidff->set_condition[PID_DEAD_BAND],
400 effect->u.condition[i].deadband); 400 effect->u.condition[i].deadband);
401 hid_wait_io(pidff->hid); 401 usbhid_wait_io(pidff->hid);
402 hid_submit_report(pidff->hid, pidff->reports[PID_SET_CONDITION], 402 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONDITION],
403 USB_DIR_OUT); 403 USB_DIR_OUT);
404 } 404 }
405} 405}
@@ -440,7 +440,7 @@ static void pidff_set_ramp_force_report(struct pidff_device *pidff,
440 effect->u.ramp.start_level); 440 effect->u.ramp.start_level);
441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END], 441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END],
442 effect->u.ramp.end_level); 442 effect->u.ramp.end_level);
443 hid_submit_report(pidff->hid, pidff->reports[PID_SET_RAMP], 443 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_RAMP],
444 USB_DIR_OUT); 444 USB_DIR_OUT);
445} 445}
446 446
@@ -465,19 +465,19 @@ static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum)
465 int j; 465 int j;
466 466
467 pidff->create_new_effect_type->value[0] = efnum; 467 pidff->create_new_effect_type->value[0] = efnum;
468 hid_submit_report(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], 468 usbhid_submit_report(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT],
469 USB_DIR_OUT); 469 USB_DIR_OUT);
470 debug("create_new_effect sent, type: %d", efnum); 470 debug("create_new_effect sent, type: %d", efnum);
471 471
472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; 472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0;
473 pidff->block_load_status->value[0] = 0; 473 pidff->block_load_status->value[0] = 0;
474 hid_wait_io(pidff->hid); 474 usbhid_wait_io(pidff->hid);
475 475
476 for (j = 0; j < 60; j++) { 476 for (j = 0; j < 60; j++) {
477 debug("pid_block_load requested"); 477 debug("pid_block_load requested");
478 hid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_LOAD], 478 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_LOAD],
479 USB_DIR_IN); 479 USB_DIR_IN);
480 hid_wait_io(pidff->hid); 480 usbhid_wait_io(pidff->hid);
481 if (pidff->block_load_status->value[0] == 481 if (pidff->block_load_status->value[0] ==
482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) { 482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) {
483 debug("device reported free memory: %d bytes", 483 debug("device reported free memory: %d bytes",
@@ -513,8 +513,8 @@ static void pidff_playback_pid(struct pidff_device *pidff, int pid_id, int n)
513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n; 513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n;
514 } 514 }
515 515
516 hid_wait_io(pidff->hid); 516 usbhid_wait_io(pidff->hid);
517 hid_submit_report(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], 517 usbhid_submit_report(pidff->hid, pidff->reports[PID_EFFECT_OPERATION],
518 USB_DIR_OUT); 518 USB_DIR_OUT);
519} 519}
520 520
@@ -536,7 +536,7 @@ static int pidff_playback(struct input_dev *dev, int effect_id, int value)
536static void pidff_erase_pid(struct pidff_device *pidff, int pid_id) 536static void pidff_erase_pid(struct pidff_device *pidff, int pid_id)
537{ 537{
538 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; 538 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id;
539 hid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_FREE], 539 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_FREE],
540 USB_DIR_OUT); 540 USB_DIR_OUT);
541} 541}
542 542
@@ -716,7 +716,7 @@ static void pidff_set_gain(struct input_dev *dev, u16 gain)
716 struct pidff_device *pidff = dev->ff->private; 716 struct pidff_device *pidff = dev->ff->private;
717 717
718 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain); 718 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain);
719 hid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN], 719 usbhid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN],
720 USB_DIR_OUT); 720 USB_DIR_OUT);
721} 721}
722 722
@@ -741,7 +741,7 @@ static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude)
741 pidff_set(&pidff->set_effect[PID_GAIN], magnitude); 741 pidff_set(&pidff->set_effect[PID_GAIN], magnitude);
742 pidff->set_effect[PID_START_DELAY].value[0] = 0; 742 pidff->set_effect[PID_START_DELAY].value[0] = 0;
743 743
744 hid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 744 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT],
745 USB_DIR_OUT); 745 USB_DIR_OUT);
746} 746}
747 747
@@ -1165,19 +1165,19 @@ static void pidff_reset(struct pidff_device *pidff)
1165 1165
1166 pidff->device_control->value[0] = pidff->control_id[PID_RESET]; 1166 pidff->device_control->value[0] = pidff->control_id[PID_RESET];
1167 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */ 1167 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */
1168 hid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1168 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT);
1169 hid_wait_io(hid); 1169 usbhid_wait_io(hid);
1170 hid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1170 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT);
1171 hid_wait_io(hid); 1171 usbhid_wait_io(hid);
1172 1172
1173 pidff->device_control->value[0] = 1173 pidff->device_control->value[0] =
1174 pidff->control_id[PID_ENABLE_ACTUATORS]; 1174 pidff->control_id[PID_ENABLE_ACTUATORS];
1175 hid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); 1175 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT);
1176 hid_wait_io(hid); 1176 usbhid_wait_io(hid);
1177 1177
1178 /* pool report is sometimes messed up, refetch it */ 1178 /* pool report is sometimes messed up, refetch it */
1179 hid_submit_report(hid, pidff->reports[PID_POOL], USB_DIR_IN); 1179 usbhid_submit_report(hid, pidff->reports[PID_POOL], USB_DIR_IN);
1180 hid_wait_io(hid); 1180 usbhid_wait_io(hid);
1181 1181
1182 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1182 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) {
1183 int sim_effects = pidff->pool[PID_SIMULTANEOUS_MAX].value[0]; 1183 int sim_effects = pidff->pool[PID_SIMULTANEOUS_MAX].value[0];
@@ -1189,9 +1189,9 @@ static void pidff_reset(struct pidff_device *pidff)
1189 break; 1189 break;
1190 } 1190 }
1191 debug("pid_pool requested again"); 1191 debug("pid_pool requested again");
1192 hid_submit_report(hid, pidff->reports[PID_POOL], 1192 usbhid_submit_report(hid, pidff->reports[PID_POOL],
1193 USB_DIR_IN); 1193 USB_DIR_IN);
1194 hid_wait_io(hid); 1194 usbhid_wait_io(hid);
1195 } 1195 }
1196 } 1196 }
1197} 1197}
@@ -1277,7 +1277,7 @@ int hid_pidff_init(struct hid_device *hid)
1277 1277
1278 if (test_bit(FF_GAIN, dev->ffbit)) { 1278 if (test_bit(FF_GAIN, dev->ffbit)) {
1279 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff); 1279 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff);
1280 hid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN], 1280 usbhid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN],
1281 USB_DIR_OUT); 1281 USB_DIR_OUT);
1282 } 1282 }
1283 1283