• Home
  • Raw
  • Download

Lines Matching refs:entry

303 	struct lg4ff_device_entry *entry = drv_data->device_props;  in lg4ff_adjust_input_event()  local
306 if (!entry) { in lg4ff_adjust_input_event()
311 switch (entry->wdata.product_id) { in lg4ff_adjust_input_event()
315 new_value = lg4ff_adjust_dfp_x_axis(value, entry->wdata.range); in lg4ff_adjust_input_event()
330 struct lg4ff_device_entry *entry = drv_data->device_props; in lg4ff_raw_event() local
332 if (!entry) in lg4ff_raw_event()
336 if (entry->wdata.combine) { in lg4ff_raw_event()
337 switch (entry->wdata.product_id) { in lg4ff_raw_event()
409 struct lg4ff_device_entry *entry; in lg4ff_play() local
421 entry = drv_data->device_props; in lg4ff_play()
422 if (!entry) { in lg4ff_play()
426 value = entry->report->field[0]->value; in lg4ff_play()
435 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_play()
446 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_play()
447 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_play()
459 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_play()
460 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_play()
473 struct lg4ff_device_entry *entry; in lg4ff_set_autocenter_default() local
483 entry = drv_data->device_props; in lg4ff_set_autocenter_default()
484 if (!entry) { in lg4ff_set_autocenter_default()
488 value = entry->report->field[0]->value; in lg4ff_set_autocenter_default()
491 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
501 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
502 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
515 switch (entry->wdata.product_id) { in lg4ff_set_autocenter_default()
532 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
543 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
544 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
551 struct lg4ff_device_entry *entry; in lg4ff_set_autocenter_ffex() local
563 entry = drv_data->device_props; in lg4ff_set_autocenter_ffex()
564 if (!entry) { in lg4ff_set_autocenter_ffex()
568 value = entry->report->field[0]->value; in lg4ff_set_autocenter_ffex()
570 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_autocenter_ffex()
579 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_ffex()
580 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_ffex()
586 struct lg4ff_device_entry *entry; in lg4ff_set_range_g25() local
597 entry = drv_data->device_props; in lg4ff_set_range_g25()
598 if (!entry) { in lg4ff_set_range_g25()
602 value = entry->report->field[0]->value; in lg4ff_set_range_g25()
605 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_range_g25()
614 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_g25()
615 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_g25()
621 struct lg4ff_device_entry *entry; in lg4ff_set_range_dfp() local
633 entry = drv_data->device_props; in lg4ff_set_range_dfp()
634 if (!entry) { in lg4ff_set_range_dfp()
638 value = entry->report->field[0]->value; in lg4ff_set_range_dfp()
642 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_range_dfp()
658 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
670 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
671 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_dfp()
685 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
686 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_dfp()
765 struct lg4ff_device_entry *entry; in lg4ff_switch_compatibility_mode() local
777 entry = drv_data->device_props; in lg4ff_switch_compatibility_mode()
778 if (!entry) { in lg4ff_switch_compatibility_mode()
782 value = entry->report->field[0]->value; in lg4ff_switch_compatibility_mode()
784 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_switch_compatibility_mode()
791 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_switch_compatibility_mode()
793 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_switch_compatibility_mode()
801 struct lg4ff_device_entry *entry; in lg4ff_alternate_modes_show() local
812 entry = drv_data->device_props; in lg4ff_alternate_modes_show()
813 if (!entry) { in lg4ff_alternate_modes_show()
818 if (!entry->wdata.real_name) { in lg4ff_alternate_modes_show()
824 if (entry->wdata.alternate_modes & BIT(i)) { in lg4ff_alternate_modes_show()
828 … !lg4ff_alternate_modes[i].product_id ? entry->wdata.real_name : lg4ff_alternate_modes[i].name); in lg4ff_alternate_modes_show()
833 if (lg4ff_alternate_modes[i].product_id == entry->wdata.product_id || 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()
850 struct lg4ff_device_entry *entry; in lg4ff_alternate_modes_store() local
863 entry = drv_data->device_props; in lg4ff_alternate_modes_store()
864 if (!entry) { in lg4ff_alternate_modes_store()
893 if (entry->wdata.alternate_modes & BIT(i)) { in lg4ff_alternate_modes_store()
896 target_product_id = entry->wdata.real_product_id; in lg4ff_alternate_modes_store()
911 if (target_product_id == entry->wdata.product_id) /* Nothing to do */ in lg4ff_alternate_modes_store()
917 entry->wdata.real_name); in lg4ff_alternate_modes_store()
922 …if ((entry->wdata.real_product_id == USB_DEVICE_ID_LOGITECH_DFP_WHEEL || entry->wdata.real_product… in lg4ff_alternate_modes_store()
923 entry->wdata.product_id > target_product_id) { in lg4ff_alternate_modes_store()
924 …hid_info(hid, "\"%s\" cannot be switched back into \"%s\" mode\n", entry->wdata.real_name, lg4ff_a… in lg4ff_alternate_modes_store()
928 s = lg4ff_get_mode_switch_command(entry->wdata.real_product_id, target_product_id); in lg4ff_alternate_modes_store()
943 struct lg4ff_device_entry *entry; in lg4ff_combine_show() local
953 entry = drv_data->device_props; in lg4ff_combine_show()
954 if (!entry) { in lg4ff_combine_show()
959 count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.combine); in lg4ff_combine_show()
967 struct lg4ff_device_entry *entry; in lg4ff_combine_store() local
977 entry = drv_data->device_props; in lg4ff_combine_store()
978 if (!entry) { in lg4ff_combine_store()
986 entry->wdata.combine = combine; in lg4ff_combine_store()
996 struct lg4ff_device_entry *entry; in lg4ff_range_show() local
1006 entry = drv_data->device_props; in lg4ff_range_show()
1007 if (!entry) { in lg4ff_range_show()
1012 count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.range); in lg4ff_range_show()
1022 struct lg4ff_device_entry *entry; in lg4ff_range_store() local
1032 entry = drv_data->device_props; in lg4ff_range_store()
1033 if (!entry) { in lg4ff_range_store()
1039 range = entry->wdata.max_range; in lg4ff_range_store()
1043 if (entry->wdata.set_range && range >= entry->wdata.min_range && range <= entry->wdata.max_range) { in lg4ff_range_store()
1044 entry->wdata.set_range(hid, range); in lg4ff_range_store()
1045 entry->wdata.range = range; in lg4ff_range_store()
1055 struct lg4ff_device_entry *entry; in lg4ff_real_id_show() local
1065 entry = drv_data->device_props; in lg4ff_real_id_show()
1066 if (!entry) { in lg4ff_real_id_show()
1071 if (!entry->wdata.real_tag || !entry->wdata.real_name) { in lg4ff_real_id_show()
1076 count = scnprintf(buf, PAGE_SIZE, "%s: %s\n", entry->wdata.real_tag, entry->wdata.real_name); in lg4ff_real_id_show()
1091 struct lg4ff_device_entry *entry; in lg4ff_set_leds() local
1101 entry = drv_data->device_props; in lg4ff_set_leds()
1102 if (!entry) { in lg4ff_set_leds()
1106 value = entry->report->field[0]->value; in lg4ff_set_leds()
1108 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_leds()
1116 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_leds()
1117 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_leds()
1126 struct lg4ff_device_entry *entry; in lg4ff_led_set_brightness() local
1134 entry = drv_data->device_props; in lg4ff_led_set_brightness()
1136 if (!entry) { in lg4ff_led_set_brightness()
1142 if (led_cdev != entry->wdata.led[i]) in lg4ff_led_set_brightness()
1144 state = (entry->wdata.led_state >> i) & 1; in lg4ff_led_set_brightness()
1146 entry->wdata.led_state &= ~(1 << i); in lg4ff_led_set_brightness()
1147 lg4ff_set_leds(hid, entry->wdata.led_state); in lg4ff_led_set_brightness()
1149 entry->wdata.led_state |= 1 << i; in lg4ff_led_set_brightness()
1150 lg4ff_set_leds(hid, entry->wdata.led_state); in lg4ff_led_set_brightness()
1161 struct lg4ff_device_entry *entry; in lg4ff_led_get_brightness() local
1169 entry = drv_data->device_props; in lg4ff_led_get_brightness()
1171 if (!entry) { in lg4ff_led_get_brightness()
1177 if (led_cdev == entry->wdata.led[i]) { in lg4ff_led_get_brightness()
1178 value = (entry->wdata.led_state >> i) & 1; in lg4ff_led_get_brightness()
1269 struct lg4ff_device_entry *entry; in lg4ff_init() local
1291 entry = kzalloc(sizeof(*entry), GFP_KERNEL); in lg4ff_init()
1292 if (!entry) in lg4ff_init()
1294 spin_lock_init(&entry->report_lock); in lg4ff_init()
1295 entry->report = report; in lg4ff_init()
1296 drv_data->device_props = entry; in lg4ff_init()
1356 lg4ff_init_wheel_data(&entry->wdata, &lg4ff_devices[i], mmode_wheel, real_product_id); in lg4ff_init()
1389 entry->wdata.range = entry->wdata.max_range; in lg4ff_init()
1390 if (entry->wdata.set_range) in lg4ff_init()
1391 entry->wdata.set_range(hid, entry->wdata.range); in lg4ff_init()
1395 entry->wdata.led_state = 0; in lg4ff_init()
1397 entry->wdata.led[j] = NULL; in lg4ff_init()
1424 entry->wdata.led[j] = led; in lg4ff_init()
1432 led = entry->wdata.led[j]; in lg4ff_init()
1433 entry->wdata.led[j] = NULL; in lg4ff_init()
1450 kfree(entry); in lg4ff_init()
1456 struct lg4ff_device_entry *entry; in lg4ff_deinit() local
1464 entry = drv_data->device_props; in lg4ff_deinit()
1465 if (!entry) in lg4ff_deinit()
1469 if (entry->wdata.alternate_modes) { in lg4ff_deinit()
1484 led = entry->wdata.led[j]; in lg4ff_deinit()
1485 entry->wdata.led[j] = NULL; in lg4ff_deinit()
1495 kfree(entry); in lg4ff_deinit()