hid-pidff.c (020abf03cd659388f94cb328e1e1df0656e0d7ff) | hid-pidff.c (d881427253da011495f4193663d809d0e9dfa215) |
---|---|
1/* 2 * Force feedback driver for USB HID PID compliant devices 3 * 4 * Copyright (c) 2005, 2006 Anssi Hannula <anssi.hannula@gmail.com> 5 */ 6 7/* 8 * This program is free software; you can redistribute it and/or modify --- 249 unchanged lines hidden (view full) --- 258 259 pidff->set_envelope[PID_ATTACK_TIME].value[0] = envelope->attack_length; 260 pidff->set_envelope[PID_FADE_TIME].value[0] = envelope->fade_length; 261 262 hid_dbg(pidff->hid, "attack %u => %d\n", 263 envelope->attack_level, 264 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]); 265 | 1/* 2 * Force feedback driver for USB HID PID compliant devices 3 * 4 * Copyright (c) 2005, 2006 Anssi Hannula <anssi.hannula@gmail.com> 5 */ 6 7/* 8 * This program is free software; you can redistribute it and/or modify --- 249 unchanged lines hidden (view full) --- 258 259 pidff->set_envelope[PID_ATTACK_TIME].value[0] = envelope->attack_length; 260 pidff->set_envelope[PID_FADE_TIME].value[0] = envelope->fade_length; 261 262 hid_dbg(pidff->hid, "attack %u => %d\n", 263 envelope->attack_level, 264 pidff->set_envelope[PID_ATTACK_LEVEL].value[0]); 265 |
266 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_ENVELOPE], 267 USB_DIR_OUT); | 266 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE], 267 HID_REQ_SET_REPORT); |
268} 269 270/* 271 * Test if the new envelope differs from old one 272 */ 273static int pidff_needs_set_envelope(struct ff_envelope *envelope, 274 struct ff_envelope *old) 275{ --- 9 unchanged lines hidden (view full) --- 285static void pidff_set_constant_force_report(struct pidff_device *pidff, 286 struct ff_effect *effect) 287{ 288 pidff->set_constant[PID_EFFECT_BLOCK_INDEX].value[0] = 289 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 290 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE], 291 effect->u.constant.level); 292 | 268} 269 270/* 271 * Test if the new envelope differs from old one 272 */ 273static int pidff_needs_set_envelope(struct ff_envelope *envelope, 274 struct ff_envelope *old) 275{ --- 9 unchanged lines hidden (view full) --- 285static void pidff_set_constant_force_report(struct pidff_device *pidff, 286 struct ff_effect *effect) 287{ 288 pidff->set_constant[PID_EFFECT_BLOCK_INDEX].value[0] = 289 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 290 pidff_set_signed(&pidff->set_constant[PID_MAGNITUDE], 291 effect->u.constant.level); 292 |
293 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONSTANT], 294 USB_DIR_OUT); | 293 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT], 294 HID_REQ_SET_REPORT); |
295} 296 297/* 298 * Test if the constant parameters have changed between effects 299 */ 300static int pidff_needs_set_constant(struct ff_effect *effect, 301 struct ff_effect *old) 302{ --- 17 unchanged lines hidden (view full) --- 320 pidff->set_effect[PID_GAIN].value[0] = 321 pidff->set_effect[PID_GAIN].field->logical_maximum; 322 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; 323 pidff->effect_direction->value[0] = 324 pidff_rescale(effect->direction, 0xffff, 325 pidff->effect_direction); 326 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; 327 | 295} 296 297/* 298 * Test if the constant parameters have changed between effects 299 */ 300static int pidff_needs_set_constant(struct ff_effect *effect, 301 struct ff_effect *old) 302{ --- 17 unchanged lines hidden (view full) --- 320 pidff->set_effect[PID_GAIN].value[0] = 321 pidff->set_effect[PID_GAIN].field->logical_maximum; 322 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; 323 pidff->effect_direction->value[0] = 324 pidff_rescale(effect->direction, 0xffff, 325 pidff->effect_direction); 326 pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay; 327 |
328 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 329 USB_DIR_OUT); | 328 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], 329 HID_REQ_SET_REPORT); |
330} 331 332/* 333 * Test if the values used in set_effect have changed 334 */ 335static int pidff_needs_set_effect(struct ff_effect *effect, 336 struct ff_effect *old) 337{ --- 14 unchanged lines hidden (view full) --- 352 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 353 pidff_set_signed(&pidff->set_periodic[PID_MAGNITUDE], 354 effect->u.periodic.magnitude); 355 pidff_set_signed(&pidff->set_periodic[PID_OFFSET], 356 effect->u.periodic.offset); 357 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase); 358 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period; 359 | 330} 331 332/* 333 * Test if the values used in set_effect have changed 334 */ 335static int pidff_needs_set_effect(struct ff_effect *effect, 336 struct ff_effect *old) 337{ --- 14 unchanged lines hidden (view full) --- 352 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 353 pidff_set_signed(&pidff->set_periodic[PID_MAGNITUDE], 354 effect->u.periodic.magnitude); 355 pidff_set_signed(&pidff->set_periodic[PID_OFFSET], 356 effect->u.periodic.offset); 357 pidff_set(&pidff->set_periodic[PID_PHASE], effect->u.periodic.phase); 358 pidff->set_periodic[PID_PERIOD].value[0] = effect->u.periodic.period; 359 |
360 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_PERIODIC], 361 USB_DIR_OUT); | 360 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC], 361 HID_REQ_SET_REPORT); |
362 363} 364 365/* 366 * Test if periodic effect parameters have changed 367 */ 368static int pidff_needs_set_periodic(struct ff_effect *effect, 369 struct ff_effect *old) --- 24 unchanged lines hidden (view full) --- 394 pidff_set_signed(&pidff->set_condition[PID_NEG_COEFFICIENT], 395 effect->u.condition[i].left_coeff); 396 pidff_set(&pidff->set_condition[PID_POS_SATURATION], 397 effect->u.condition[i].right_saturation); 398 pidff_set(&pidff->set_condition[PID_NEG_SATURATION], 399 effect->u.condition[i].left_saturation); 400 pidff_set(&pidff->set_condition[PID_DEAD_BAND], 401 effect->u.condition[i].deadband); | 362 363} 364 365/* 366 * Test if periodic effect parameters have changed 367 */ 368static int pidff_needs_set_periodic(struct ff_effect *effect, 369 struct ff_effect *old) --- 24 unchanged lines hidden (view full) --- 394 pidff_set_signed(&pidff->set_condition[PID_NEG_COEFFICIENT], 395 effect->u.condition[i].left_coeff); 396 pidff_set(&pidff->set_condition[PID_POS_SATURATION], 397 effect->u.condition[i].right_saturation); 398 pidff_set(&pidff->set_condition[PID_NEG_SATURATION], 399 effect->u.condition[i].left_saturation); 400 pidff_set(&pidff->set_condition[PID_DEAD_BAND], 401 effect->u.condition[i].deadband); |
402 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_CONDITION], 403 USB_DIR_OUT); | 402 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], 403 HID_REQ_SET_REPORT); |
404 } 405} 406 407/* 408 * Test if condition effect parameters have changed 409 */ 410static int pidff_needs_set_condition(struct ff_effect *effect, 411 struct ff_effect *old) --- 23 unchanged lines hidden (view full) --- 435 struct ff_effect *effect) 436{ 437 pidff->set_ramp[PID_EFFECT_BLOCK_INDEX].value[0] = 438 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 439 pidff_set_signed(&pidff->set_ramp[PID_RAMP_START], 440 effect->u.ramp.start_level); 441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END], 442 effect->u.ramp.end_level); | 404 } 405} 406 407/* 408 * Test if condition effect parameters have changed 409 */ 410static int pidff_needs_set_condition(struct ff_effect *effect, 411 struct ff_effect *old) --- 23 unchanged lines hidden (view full) --- 435 struct ff_effect *effect) 436{ 437 pidff->set_ramp[PID_EFFECT_BLOCK_INDEX].value[0] = 438 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0]; 439 pidff_set_signed(&pidff->set_ramp[PID_RAMP_START], 440 effect->u.ramp.start_level); 441 pidff_set_signed(&pidff->set_ramp[PID_RAMP_END], 442 effect->u.ramp.end_level); |
443 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_RAMP], 444 USB_DIR_OUT); | 443 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP], 444 HID_REQ_SET_REPORT); |
445} 446 447/* 448 * Test if ramp force parameters have changed 449 */ 450static int pidff_needs_set_ramp(struct ff_effect *effect, struct ff_effect *old) 451{ 452 return effect->u.ramp.start_level != old->u.ramp.start_level || --- 7 unchanged lines hidden (view full) --- 460 * is full. Upon unknown response the function will retry for 60 times, if 461 * still unsuccessful -EIO is returned. 462 */ 463static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum) 464{ 465 int j; 466 467 pidff->create_new_effect_type->value[0] = efnum; | 445} 446 447/* 448 * Test if ramp force parameters have changed 449 */ 450static int pidff_needs_set_ramp(struct ff_effect *effect, struct ff_effect *old) 451{ 452 return effect->u.ramp.start_level != old->u.ramp.start_level || --- 7 unchanged lines hidden (view full) --- 460 * is full. Upon unknown response the function will retry for 60 times, if 461 * still unsuccessful -EIO is returned. 462 */ 463static int pidff_request_effect_upload(struct pidff_device *pidff, int efnum) 464{ 465 int j; 466 467 pidff->create_new_effect_type->value[0] = efnum; |
468 usbhid_submit_report(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], 469 USB_DIR_OUT); | 468 hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], 469 HID_REQ_SET_REPORT); |
470 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); 471 472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; 473 pidff->block_load_status->value[0] = 0; 474 usbhid_wait_io(pidff->hid); 475 476 for (j = 0; j < 60; j++) { 477 hid_dbg(pidff->hid, "pid_block_load requested\n"); | 470 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); 471 472 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; 473 pidff->block_load_status->value[0] = 0; 474 usbhid_wait_io(pidff->hid); 475 476 for (j = 0; j < 60; j++) { 477 hid_dbg(pidff->hid, "pid_block_load requested\n"); |
478 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_LOAD], 479 USB_DIR_IN); | 478 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_LOAD], 479 HID_REQ_GET_REPORT); |
480 usbhid_wait_io(pidff->hid); 481 if (pidff->block_load_status->value[0] == 482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) { 483 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n", 484 pidff->block_load[PID_RAM_POOL_AVAILABLE].value ? 485 pidff->block_load[PID_RAM_POOL_AVAILABLE].value[0] : -1); 486 return 0; 487 } --- 20 unchanged lines hidden (view full) --- 508 pidff->effect_operation_status->value[0] = 509 pidff->operation_id[PID_EFFECT_STOP]; 510 } else { 511 pidff->effect_operation_status->value[0] = 512 pidff->operation_id[PID_EFFECT_START]; 513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n; 514 } 515 | 480 usbhid_wait_io(pidff->hid); 481 if (pidff->block_load_status->value[0] == 482 pidff->status_id[PID_BLOCK_LOAD_SUCCESS]) { 483 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n", 484 pidff->block_load[PID_RAM_POOL_AVAILABLE].value ? 485 pidff->block_load[PID_RAM_POOL_AVAILABLE].value[0] : -1); 486 return 0; 487 } --- 20 unchanged lines hidden (view full) --- 508 pidff->effect_operation_status->value[0] = 509 pidff->operation_id[PID_EFFECT_STOP]; 510 } else { 511 pidff->effect_operation_status->value[0] = 512 pidff->operation_id[PID_EFFECT_START]; 513 pidff->effect_operation[PID_LOOP_COUNT].value[0] = n; 514 } 515 |
516 usbhid_submit_report(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], 517 USB_DIR_OUT); | 516 hid_hw_request(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], 517 HID_REQ_SET_REPORT); |
518} 519 520/** 521 * Play the effect with effect id @effect_id for @value times 522 */ 523static int pidff_playback(struct input_dev *dev, int effect_id, int value) 524{ 525 struct pidff_device *pidff = dev->ff->private; --- 4 unchanged lines hidden (view full) --- 530} 531 532/* 533 * Erase effect with PID id 534 */ 535static void pidff_erase_pid(struct pidff_device *pidff, int pid_id) 536{ 537 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; | 518} 519 520/** 521 * Play the effect with effect id @effect_id for @value times 522 */ 523static int pidff_playback(struct input_dev *dev, int effect_id, int value) 524{ 525 struct pidff_device *pidff = dev->ff->private; --- 4 unchanged lines hidden (view full) --- 530} 531 532/* 533 * Erase effect with PID id 534 */ 535static void pidff_erase_pid(struct pidff_device *pidff, int pid_id) 536{ 537 pidff->block_free[PID_EFFECT_BLOCK_INDEX].value[0] = pid_id; |
538 usbhid_submit_report(pidff->hid, pidff->reports[PID_BLOCK_FREE], 539 USB_DIR_OUT); | 538 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_FREE], 539 HID_REQ_SET_REPORT); |
540} 541 542/* 543 * Stop and erase effect with effect_id 544 */ 545static int pidff_erase_effect(struct input_dev *dev, int effect_id) 546{ 547 struct pidff_device *pidff = dev->ff->private; --- 165 unchanged lines hidden (view full) --- 713/* 714 * set_gain() handler 715 */ 716static void pidff_set_gain(struct input_dev *dev, u16 gain) 717{ 718 struct pidff_device *pidff = dev->ff->private; 719 720 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain); | 540} 541 542/* 543 * Stop and erase effect with effect_id 544 */ 545static int pidff_erase_effect(struct input_dev *dev, int effect_id) 546{ 547 struct pidff_device *pidff = dev->ff->private; --- 165 unchanged lines hidden (view full) --- 713/* 714 * set_gain() handler 715 */ 716static void pidff_set_gain(struct input_dev *dev, u16 gain) 717{ 718 struct pidff_device *pidff = dev->ff->private; 719 720 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], gain); |
721 usbhid_submit_report(pidff->hid, pidff->reports[PID_DEVICE_GAIN], 722 USB_DIR_OUT); | 721 hid_hw_request(pidff->hid, pidff->reports[PID_DEVICE_GAIN], 722 HID_REQ_SET_REPORT); |
723} 724 725static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude) 726{ 727 struct hid_field *field = 728 pidff->block_load[PID_EFFECT_BLOCK_INDEX].field; 729 730 if (!magnitude) { --- 8 unchanged lines hidden (view full) --- 739 pidff->set_effect_type->value[0] = pidff->type_id[PID_SPRING]; 740 pidff->set_effect[PID_DURATION].value[0] = 0; 741 pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0; 742 pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0; 743 pidff_set(&pidff->set_effect[PID_GAIN], magnitude); 744 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; 745 pidff->set_effect[PID_START_DELAY].value[0] = 0; 746 | 723} 724 725static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude) 726{ 727 struct hid_field *field = 728 pidff->block_load[PID_EFFECT_BLOCK_INDEX].field; 729 730 if (!magnitude) { --- 8 unchanged lines hidden (view full) --- 739 pidff->set_effect_type->value[0] = pidff->type_id[PID_SPRING]; 740 pidff->set_effect[PID_DURATION].value[0] = 0; 741 pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0; 742 pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0; 743 pidff_set(&pidff->set_effect[PID_GAIN], magnitude); 744 pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1; 745 pidff->set_effect[PID_START_DELAY].value[0] = 0; 746 |
747 usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT], 748 USB_DIR_OUT); | 747 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], 748 HID_REQ_SET_REPORT); |
749} 750 751/* 752 * pidff_set_autocenter() handler 753 */ 754static void pidff_set_autocenter(struct input_dev *dev, u16 magnitude) 755{ 756 struct pidff_device *pidff = dev->ff->private; --- 396 unchanged lines hidden (view full) --- 1153 */ 1154static void pidff_reset(struct pidff_device *pidff) 1155{ 1156 struct hid_device *hid = pidff->hid; 1157 int i = 0; 1158 1159 pidff->device_control->value[0] = pidff->control_id[PID_RESET]; 1160 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */ | 749} 750 751/* 752 * pidff_set_autocenter() handler 753 */ 754static void pidff_set_autocenter(struct input_dev *dev, u16 magnitude) 755{ 756 struct pidff_device *pidff = dev->ff->private; --- 396 unchanged lines hidden (view full) --- 1153 */ 1154static void pidff_reset(struct pidff_device *pidff) 1155{ 1156 struct hid_device *hid = pidff->hid; 1157 int i = 0; 1158 1159 pidff->device_control->value[0] = pidff->control_id[PID_RESET]; 1160 /* We reset twice as sometimes hid_wait_io isn't waiting long enough */ |
1161 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); | 1161 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); |
1162 usbhid_wait_io(hid); | 1162 usbhid_wait_io(hid); |
1163 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); | 1163 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); |
1164 usbhid_wait_io(hid); 1165 1166 pidff->device_control->value[0] = 1167 pidff->control_id[PID_ENABLE_ACTUATORS]; | 1164 usbhid_wait_io(hid); 1165 1166 pidff->device_control->value[0] = 1167 pidff->control_id[PID_ENABLE_ACTUATORS]; |
1168 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_CONTROL], USB_DIR_OUT); | 1168 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); |
1169 usbhid_wait_io(hid); 1170 1171 /* pool report is sometimes messed up, refetch it */ | 1169 usbhid_wait_io(hid); 1170 1171 /* pool report is sometimes messed up, refetch it */ |
1172 usbhid_submit_report(hid, pidff->reports[PID_POOL], USB_DIR_IN); | 1172 hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT); |
1173 usbhid_wait_io(hid); 1174 1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1176 while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) { 1177 if (i++ > 20) { 1178 hid_warn(pidff->hid, 1179 "device reports %d simultaneous effects\n", 1180 pidff->pool[PID_SIMULTANEOUS_MAX].value[0]); 1181 break; 1182 } 1183 hid_dbg(pidff->hid, "pid_pool requested again\n"); | 1173 usbhid_wait_io(hid); 1174 1175 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1176 while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) { 1177 if (i++ > 20) { 1178 hid_warn(pidff->hid, 1179 "device reports %d simultaneous effects\n", 1180 pidff->pool[PID_SIMULTANEOUS_MAX].value[0]); 1181 break; 1182 } 1183 hid_dbg(pidff->hid, "pid_pool requested again\n"); |
1184 usbhid_submit_report(hid, pidff->reports[PID_POOL], 1185 USB_DIR_IN); | 1184 hid_hw_request(hid, pidff->reports[PID_POOL], 1185 HID_REQ_GET_REPORT); |
1186 usbhid_wait_io(hid); 1187 } 1188 } 1189} 1190 1191/* 1192 * Test if autocenter modification is using the supported method 1193 */ --- 70 unchanged lines hidden (view full) --- 1264 error = pidff_init_fields(pidff, dev); 1265 if (error) 1266 goto fail; 1267 1268 pidff_reset(pidff); 1269 1270 if (test_bit(FF_GAIN, dev->ffbit)) { 1271 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff); | 1186 usbhid_wait_io(hid); 1187 } 1188 } 1189} 1190 1191/* 1192 * Test if autocenter modification is using the supported method 1193 */ --- 70 unchanged lines hidden (view full) --- 1264 error = pidff_init_fields(pidff, dev); 1265 if (error) 1266 goto fail; 1267 1268 pidff_reset(pidff); 1269 1270 if (test_bit(FF_GAIN, dev->ffbit)) { 1271 pidff_set(&pidff->device_gain[PID_DEVICE_GAIN_FIELD], 0xffff); |
1272 usbhid_submit_report(hid, pidff->reports[PID_DEVICE_GAIN], 1273 USB_DIR_OUT); | 1272 hid_hw_request(hid, pidff->reports[PID_DEVICE_GAIN], 1273 HID_REQ_SET_REPORT); |
1274 } 1275 1276 error = pidff_check_autocenter(pidff, dev); 1277 if (error) 1278 goto fail; 1279 1280 max_effects = 1281 pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_maximum - --- 42 unchanged lines hidden --- | 1274 } 1275 1276 error = pidff_check_autocenter(pidff, dev); 1277 if (error) 1278 goto fail; 1279 1280 max_effects = 1281 pidff->block_load[PID_EFFECT_BLOCK_INDEX].field->logical_maximum - --- 42 unchanged lines hidden --- |