Lines Matching +full:0 +full:xf8
24 #define LG4FF_MMODE_IS_MULTIMODE 0
28 #define LG4FF_MODE_NATIVE_IDX 0
58 #define LG4FF_FFEX_REV_MAJ 0x21
59 #define LG4FF_FFEX_REV_MIN 0x00
164 [LG4FF_MODE_NATIVE_IDX] = {0, "native", ""},
176 0xf000,
177 0x1000,
183 0xff00,
184 0x1200,
190 0xfff0,
191 0x1230,
197 0xff00,
198 0x1300,
204 0xfff8,
205 0x1350,
211 0xff00,
212 0x8900,
230 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
231 0xf8, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00} /* Switch mode to DF-EX with detach */
236 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
237 0xf8, 0x09, 0x01, 0x01, 0x00, 0x00, 0x00} /* Switch mode to DFP with detach */
242 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
243 0xf8, 0x09, 0x02, 0x01, 0x00, 0x00, 0x00} /* Switch mode to G25 with detach */
248 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
249 0xf8, 0x09, 0x03, 0x01, 0x00, 0x00, 0x00} /* Switch mode to DFGT with detach */
254 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
255 0xf8, 0x09, 0x04, 0x01, 0x00, 0x00, 0x00} /* Switch mode to G27 with detach */
260 {0xf8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, /* Revert mode upon USB reset */
261 0xf8, 0x09, 0x05, 0x01, 0x01, 0x00, 0x00} /* Switch mode to G29 with detach */
267 {0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}
273 {0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}
292 if (new_value < 0) in lg4ff_adjust_dfp_x_axis()
293 return 0; in lg4ff_adjust_dfp_x_axis()
304 s32 new_value = 0; in lg4ff_adjust_input_event()
308 return 0; in lg4ff_adjust_input_event()
319 return 0; in lg4ff_adjust_input_event()
322 return 0; in lg4ff_adjust_input_event()
333 return 0; in lg4ff_raw_event()
340 rd[6] = 0x7F; in lg4ff_raw_event()
347 rd[5] = 0x7F; in lg4ff_raw_event()
351 rd[6] = 0x7F; in lg4ff_raw_event()
365 return 0; in lg4ff_raw_event()
369 rd[offset] = (0xFF + rd[offset] - rd[offset+1]) >> 1; in lg4ff_raw_event()
370 rd[offset+1] = 0x7F; in lg4ff_raw_event()
374 return 0; in lg4ff_raw_event()
381 u32 alternate_modes = 0; in lg4ff_init_wheel_data()
394 .combine = 0, in lg4ff_init_wheel_data()
426 value = entry->report->field[0]->value; in lg4ff_play()
428 #define CLAMP(x) do { if (x < 0) x = 0; else if (x > 0xff) x = 0xff; } while (0) in lg4ff_play()
432 x = effect->u.ramp.start_level + 0x80; /* 0x80 is no force */ in lg4ff_play()
436 if (x == 0x80) { in lg4ff_play()
438 value[0] = 0x13; in lg4ff_play()
439 value[1] = 0x00; in lg4ff_play()
440 value[2] = 0x00; in lg4ff_play()
441 value[3] = 0x00; in lg4ff_play()
442 value[4] = 0x00; in lg4ff_play()
443 value[5] = 0x00; in lg4ff_play()
444 value[6] = 0x00; in lg4ff_play()
448 return 0; in lg4ff_play()
451 value[0] = 0x11; /* Slot 1 */ in lg4ff_play()
452 value[1] = 0x08; in lg4ff_play()
454 value[3] = 0x80; in lg4ff_play()
455 value[4] = 0x00; in lg4ff_play()
456 value[5] = 0x00; in lg4ff_play()
457 value[6] = 0x00; in lg4ff_play()
463 return 0; in lg4ff_play()
488 value = entry->report->field[0]->value; in lg4ff_set_autocenter_default()
492 if (magnitude == 0) { in lg4ff_set_autocenter_default()
493 value[0] = 0xf5; in lg4ff_set_autocenter_default()
494 value[1] = 0x00; in lg4ff_set_autocenter_default()
495 value[2] = 0x00; in lg4ff_set_autocenter_default()
496 value[3] = 0x00; in lg4ff_set_autocenter_default()
497 value[4] = 0x00; in lg4ff_set_autocenter_default()
498 value[5] = 0x00; in lg4ff_set_autocenter_default()
499 value[6] = 0x00; in lg4ff_set_autocenter_default()
506 if (magnitude <= 0xaaaa) { in lg4ff_set_autocenter_default()
507 expand_a = 0x0c * magnitude; in lg4ff_set_autocenter_default()
508 expand_b = 0x80 * magnitude; in lg4ff_set_autocenter_default()
510 expand_a = (0x0c * 0xaaaa) + 0x06 * (magnitude - 0xaaaa); in lg4ff_set_autocenter_default()
511 expand_b = (0x80 * 0xaaaa) + 0xff * (magnitude - 0xaaaa); in lg4ff_set_autocenter_default()
524 value[0] = 0xfe; in lg4ff_set_autocenter_default()
525 value[1] = 0x0d; in lg4ff_set_autocenter_default()
526 value[2] = expand_a / 0xaaaa; in lg4ff_set_autocenter_default()
527 value[3] = expand_a / 0xaaaa; in lg4ff_set_autocenter_default()
528 value[4] = expand_b / 0xaaaa; in lg4ff_set_autocenter_default()
529 value[5] = 0x00; in lg4ff_set_autocenter_default()
530 value[6] = 0x00; in lg4ff_set_autocenter_default()
535 value[0] = 0x14; in lg4ff_set_autocenter_default()
536 value[1] = 0x00; in lg4ff_set_autocenter_default()
537 value[2] = 0x00; in lg4ff_set_autocenter_default()
538 value[3] = 0x00; in lg4ff_set_autocenter_default()
539 value[4] = 0x00; in lg4ff_set_autocenter_default()
540 value[5] = 0x00; in lg4ff_set_autocenter_default()
541 value[6] = 0x00; in lg4ff_set_autocenter_default()
568 value = entry->report->field[0]->value; in lg4ff_set_autocenter_ffex()
571 value[0] = 0xfe; in lg4ff_set_autocenter_ffex()
572 value[1] = 0x03; in lg4ff_set_autocenter_ffex()
576 value[5] = 0x00; in lg4ff_set_autocenter_ffex()
577 value[6] = 0x00; in lg4ff_set_autocenter_ffex()
602 value = entry->report->field[0]->value; in lg4ff_set_range_g25()
606 value[0] = 0xf8; in lg4ff_set_range_g25()
607 value[1] = 0x81; in lg4ff_set_range_g25()
608 value[2] = range & 0x00ff; in lg4ff_set_range_g25()
609 value[3] = (range & 0xff00) >> 8; in lg4ff_set_range_g25()
610 value[4] = 0x00; in lg4ff_set_range_g25()
611 value[5] = 0x00; in lg4ff_set_range_g25()
612 value[6] = 0x00; in lg4ff_set_range_g25()
638 value = entry->report->field[0]->value; in lg4ff_set_range_dfp()
643 value[0] = 0xf8; in lg4ff_set_range_dfp()
644 value[1] = 0x00; /* Set later */ in lg4ff_set_range_dfp()
645 value[2] = 0x00; in lg4ff_set_range_dfp()
646 value[3] = 0x00; in lg4ff_set_range_dfp()
647 value[4] = 0x00; in lg4ff_set_range_dfp()
648 value[5] = 0x00; in lg4ff_set_range_dfp()
649 value[6] = 0x00; in lg4ff_set_range_dfp()
652 value[1] = 0x03; in lg4ff_set_range_dfp()
655 value[1] = 0x02; in lg4ff_set_range_dfp()
661 value[0] = 0x81; in lg4ff_set_range_dfp()
662 value[1] = 0x0b; in lg4ff_set_range_dfp()
663 value[2] = 0x00; in lg4ff_set_range_dfp()
664 value[3] = 0x00; in lg4ff_set_range_dfp()
665 value[4] = 0x00; in lg4ff_set_range_dfp()
666 value[5] = 0x00; in lg4ff_set_range_dfp()
667 value[6] = 0x00; in lg4ff_set_range_dfp()
677 start_right = 0xfff - start_left; in lg4ff_set_range_dfp()
681 value[4] = 0xff; in lg4ff_set_range_dfp()
682 value[5] = (start_right & 0xe) << 4 | (start_left & 0xe); in lg4ff_set_range_dfp()
683 value[6] = 0xff; in lg4ff_set_range_dfp()
782 value = entry->report->field[0]->value; in lg4ff_switch_compatibility_mode()
785 for (i = 0; i < s->cmd_count; i++) { in lg4ff_switch_compatibility_mode()
788 for (j = 0; j < 7; j++) in lg4ff_switch_compatibility_mode()
795 return 0; in lg4ff_switch_compatibility_mode()
803 ssize_t count = 0; in lg4ff_alternate_modes_show()
809 return 0; in lg4ff_alternate_modes_show()
815 return 0; in lg4ff_alternate_modes_show()
820 return 0; in lg4ff_alternate_modes_show()
823 for (i = 0; i < LG4FF_MODE_MAX_IDX; i++) { in lg4ff_alternate_modes_show()
834 …(lg4ff_alternate_modes[i].product_id == 0 && entry->wdata.product_id == entry->wdata.real_product_… in lg4ff_alternate_modes_show()
853 u16 target_product_id = 0; in lg4ff_alternate_modes_store()
876 if (i == 0) { in lg4ff_alternate_modes_store()
886 lbuf[i-1] = '\0'; in lg4ff_alternate_modes_store()
889 for (i = 0; i < LG4FF_MODE_MAX_IDX; i++) { in lg4ff_alternate_modes_store()
935 return (ret == 0 ? count : ret); in lg4ff_alternate_modes_store()
950 return 0; in lg4ff_combine_show()
956 return 0; in lg4ff_combine_show()
1003 return 0; in lg4ff_range_show()
1009 return 0; in lg4ff_range_show()
1038 if (range == 0) in lg4ff_range_store()
1062 return 0; in lg4ff_real_id_show()
1068 return 0; in lg4ff_real_id_show()
1073 return 0; in lg4ff_real_id_show()
1106 value = entry->report->field[0]->value; in lg4ff_set_leds()
1109 value[0] = 0xf8; in lg4ff_set_leds()
1110 value[1] = 0x12; in lg4ff_set_leds()
1112 value[3] = 0x00; in lg4ff_set_leds()
1113 value[4] = 0x00; in lg4ff_set_leds()
1114 value[5] = 0x00; in lg4ff_set_leds()
1115 value[6] = 0x00; in lg4ff_set_leds()
1127 int i, state = 0; in lg4ff_led_set_brightness()
1141 for (i = 0; i < 5; i++) { in lg4ff_led_set_brightness()
1162 int i, value = 0; in lg4ff_led_get_brightness()
1176 for (i = 0; i < 5; i++) in lg4ff_led_get_brightness()
1199 return 0; in lg4ff_identify_multimode_wheel()
1203 for (i = 0; i < ARRAY_SIZE(lg4ff_main_checklist); i++) { in lg4ff_identify_multimode_wheel()
1218 return 0; in lg4ff_identify_multimode_wheel()
1283 if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) in lg4ff_init()
1306 return 0; in lg4ff_init()
1307 else if (mmode_ret < 0) { in lg4ff_init()
1314 for (i = 0; i < ARRAY_SIZE(lg4ff_devices); i++) { in lg4ff_init()
1330 for (mmode_idx = 0; mmode_idx < ARRAY_SIZE(lg4ff_multimode_wheels); mmode_idx++) { in lg4ff_init()
1343 for (j = 0; lg4ff_devices[i].ff_effects[j] >= 0; j++) in lg4ff_init()
1363 (bcdDevice & 0xff) == LG4FF_FFEX_REV_MIN) in lg4ff_init()
1368 dev->ff->set_autocenter(dev, 0); in lg4ff_init()
1395 entry->wdata.led_state = 0; in lg4ff_init()
1396 for (j = 0; j < 5; j++) in lg4ff_init()
1405 lg4ff_set_leds(hid, 0); in lg4ff_init()
1409 for (j = 0; j < 5; j++) { in lg4ff_init()
1419 led->brightness = 0; in lg4ff_init()
1431 for (j = 0; j < 5; j++) { in lg4ff_init()
1446 return 0; in lg4ff_init()
1482 for (j = 0; j < 5; j++) { in lg4ff_deinit()
1498 return 0; in lg4ff_deinit()