Lines Matching refs:entry
310 struct lg4ff_device_entry *entry = drv_data->device_props; in lg4ff_adjust_input_event() local
313 if (!entry) { in lg4ff_adjust_input_event()
318 switch (entry->wdata.product_id) { in lg4ff_adjust_input_event()
322 new_value = lg4ff_adjust_dfp_x_axis(value, entry->wdata.range); in lg4ff_adjust_input_event()
364 struct lg4ff_device_entry *entry; in lg4ff_play() local
376 entry = drv_data->device_props; in lg4ff_play()
377 if (!entry) { in lg4ff_play()
381 value = entry->report->field[0]->value; in lg4ff_play()
390 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_play()
401 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_play()
402 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_play()
414 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_play()
415 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_play()
430 struct lg4ff_device_entry *entry; in lg4ff_set_autocenter_default() local
440 entry = drv_data->device_props; in lg4ff_set_autocenter_default()
441 if (!entry) { in lg4ff_set_autocenter_default()
445 value = entry->report->field[0]->value; in lg4ff_set_autocenter_default()
448 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
458 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
459 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
472 switch (entry->wdata.product_id) { in lg4ff_set_autocenter_default()
489 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
500 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_default()
501 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_default()
508 struct lg4ff_device_entry *entry; in lg4ff_set_autocenter_ffex() local
520 entry = drv_data->device_props; in lg4ff_set_autocenter_ffex()
521 if (!entry) { in lg4ff_set_autocenter_ffex()
525 value = entry->report->field[0]->value; in lg4ff_set_autocenter_ffex()
527 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_autocenter_ffex()
536 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_autocenter_ffex()
537 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_autocenter_ffex()
543 struct lg4ff_device_entry *entry; in lg4ff_set_range_g25() local
554 entry = drv_data->device_props; in lg4ff_set_range_g25()
555 if (!entry) { in lg4ff_set_range_g25()
559 value = entry->report->field[0]->value; in lg4ff_set_range_g25()
562 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_range_g25()
571 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_g25()
572 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_g25()
578 struct lg4ff_device_entry *entry; in lg4ff_set_range_dfp() local
590 entry = drv_data->device_props; in lg4ff_set_range_dfp()
591 if (!entry) { in lg4ff_set_range_dfp()
595 value = entry->report->field[0]->value; in lg4ff_set_range_dfp()
599 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_range_dfp()
615 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
627 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
628 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_dfp()
642 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_range_dfp()
643 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_range_dfp()
722 struct lg4ff_device_entry *entry; in lg4ff_switch_compatibility_mode() local
734 entry = drv_data->device_props; in lg4ff_switch_compatibility_mode()
735 if (!entry) { in lg4ff_switch_compatibility_mode()
739 value = entry->report->field[0]->value; in lg4ff_switch_compatibility_mode()
741 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_switch_compatibility_mode()
748 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_switch_compatibility_mode()
750 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_switch_compatibility_mode()
758 struct lg4ff_device_entry *entry; in lg4ff_alternate_modes_show() local
769 entry = drv_data->device_props; in lg4ff_alternate_modes_show()
770 if (!entry) { in lg4ff_alternate_modes_show()
775 if (!entry->wdata.real_name) { in lg4ff_alternate_modes_show()
781 if (entry->wdata.alternate_modes & BIT(i)) { in lg4ff_alternate_modes_show()
785 … !lg4ff_alternate_modes[i].product_id ? entry->wdata.real_name : lg4ff_alternate_modes[i].name); in lg4ff_alternate_modes_show()
790 if (lg4ff_alternate_modes[i].product_id == entry->wdata.product_id || in lg4ff_alternate_modes_show()
791 …(lg4ff_alternate_modes[i].product_id == 0 && entry->wdata.product_id == entry->wdata.real_product_… in lg4ff_alternate_modes_show()
807 struct lg4ff_device_entry *entry; in lg4ff_alternate_modes_store() local
820 entry = drv_data->device_props; in lg4ff_alternate_modes_store()
821 if (!entry) { in lg4ff_alternate_modes_store()
844 if (entry->wdata.alternate_modes & BIT(i)) { in lg4ff_alternate_modes_store()
847 target_product_id = entry->wdata.real_product_id; in lg4ff_alternate_modes_store()
862 if (target_product_id == entry->wdata.product_id) /* Nothing to do */ in lg4ff_alternate_modes_store()
868 entry->wdata.real_name); in lg4ff_alternate_modes_store()
873 …if ((entry->wdata.real_product_id == USB_DEVICE_ID_LOGITECH_DFP_WHEEL || entry->wdata.real_product… in lg4ff_alternate_modes_store()
874 entry->wdata.product_id > target_product_id) { in lg4ff_alternate_modes_store()
875 …hid_info(hid, "\"%s\" cannot be switched back into \"%s\" mode\n", entry->wdata.real_name, lg4ff_a… in lg4ff_alternate_modes_store()
879 s = lg4ff_get_mode_switch_command(entry->wdata.real_product_id, target_product_id); in lg4ff_alternate_modes_store()
895 struct lg4ff_device_entry *entry; in lg4ff_range_show() local
905 entry = drv_data->device_props; in lg4ff_range_show()
906 if (!entry) { in lg4ff_range_show()
911 count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.range); in lg4ff_range_show()
921 struct lg4ff_device_entry *entry; in lg4ff_range_store() local
931 entry = drv_data->device_props; in lg4ff_range_store()
932 if (!entry) { in lg4ff_range_store()
938 range = entry->wdata.max_range; in lg4ff_range_store()
942 if (entry->wdata.set_range && range >= entry->wdata.min_range && range <= entry->wdata.max_range) { in lg4ff_range_store()
943 entry->wdata.set_range(hid, range); in lg4ff_range_store()
944 entry->wdata.range = range; in lg4ff_range_store()
954 struct lg4ff_device_entry *entry; in lg4ff_real_id_show() local
964 entry = drv_data->device_props; in lg4ff_real_id_show()
965 if (!entry) { in lg4ff_real_id_show()
970 if (!entry->wdata.real_tag || !entry->wdata.real_name) { in lg4ff_real_id_show()
975 count = scnprintf(buf, PAGE_SIZE, "%s: %s\n", entry->wdata.real_tag, entry->wdata.real_name); in lg4ff_real_id_show()
990 struct lg4ff_device_entry *entry; in lg4ff_set_leds() local
1000 entry = drv_data->device_props; in lg4ff_set_leds()
1001 if (!entry) { in lg4ff_set_leds()
1005 value = entry->report->field[0]->value; in lg4ff_set_leds()
1007 spin_lock_irqsave(&entry->report_lock, flags); in lg4ff_set_leds()
1015 hid_hw_request(hid, entry->report, HID_REQ_SET_REPORT); in lg4ff_set_leds()
1016 spin_unlock_irqrestore(&entry->report_lock, flags); in lg4ff_set_leds()
1025 struct lg4ff_device_entry *entry; in lg4ff_led_set_brightness() local
1033 entry = drv_data->device_props; in lg4ff_led_set_brightness()
1035 if (!entry) { in lg4ff_led_set_brightness()
1041 if (led_cdev != entry->wdata.led[i]) in lg4ff_led_set_brightness()
1043 state = (entry->wdata.led_state >> i) & 1; in lg4ff_led_set_brightness()
1045 entry->wdata.led_state &= ~(1 << i); in lg4ff_led_set_brightness()
1046 lg4ff_set_leds(hid, entry->wdata.led_state); in lg4ff_led_set_brightness()
1048 entry->wdata.led_state |= 1 << i; in lg4ff_led_set_brightness()
1049 lg4ff_set_leds(hid, entry->wdata.led_state); in lg4ff_led_set_brightness()
1060 struct lg4ff_device_entry *entry; in lg4ff_led_get_brightness() local
1068 entry = drv_data->device_props; in lg4ff_led_get_brightness()
1070 if (!entry) { in lg4ff_led_get_brightness()
1076 if (led_cdev == entry->wdata.led[i]) { in lg4ff_led_get_brightness()
1077 value = (entry->wdata.led_state >> i) & 1; in lg4ff_led_get_brightness()
1168 struct lg4ff_device_entry *entry; in lg4ff_init() local
1183 entry = kzalloc(sizeof(*entry), GFP_KERNEL); in lg4ff_init()
1184 if (!entry) in lg4ff_init()
1186 spin_lock_init(&entry->report_lock); in lg4ff_init()
1187 entry->report = report; in lg4ff_init()
1188 drv_data->device_props = entry; in lg4ff_init()
1248 lg4ff_init_wheel_data(&entry->wdata, &lg4ff_devices[i], mmode_wheel, real_product_id); in lg4ff_init()
1278 entry->wdata.range = entry->wdata.max_range; in lg4ff_init()
1279 if (entry->wdata.set_range) in lg4ff_init()
1280 entry->wdata.set_range(hid, entry->wdata.range); in lg4ff_init()
1284 entry->wdata.led_state = 0; in lg4ff_init()
1286 entry->wdata.led[j] = NULL; in lg4ff_init()
1313 entry->wdata.led[j] = led; in lg4ff_init()
1321 led = entry->wdata.led[j]; in lg4ff_init()
1322 entry->wdata.led[j] = NULL; in lg4ff_init()
1339 kfree(entry); in lg4ff_init()
1345 struct lg4ff_device_entry *entry; in lg4ff_deinit() local
1353 entry = drv_data->device_props; in lg4ff_deinit()
1354 if (!entry) in lg4ff_deinit()
1358 if (entry->wdata.alternate_modes) { in lg4ff_deinit()
1372 led = entry->wdata.led[j]; in lg4ff_deinit()
1373 entry->wdata.led[j] = NULL; in lg4ff_deinit()
1384 kfree(entry); in lg4ff_deinit()