Lines Matching refs:hid

28 #include <linux/hid.h>
31 #include "hid-lg.h"
32 #include "hid-ids.h"
47 static void hid_lg4ff_set_range_dfp(struct hid_device *hid, u16 range);
48 static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range);
63 void (*set_range)(struct hid_device *hid, u16 range);
79 void (*set_range)(struct hid_device *hid, u16 range);
135 struct hid_device *hid = input_get_drvdata(dev);
136 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
154 usbhid_submit_report(hid, report, USB_DIR_OUT);
164 struct hid_device *hid = input_get_drvdata(dev);
165 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
176 usbhid_submit_report(hid, report, USB_DIR_OUT);
182 struct hid_device *hid = input_get_drvdata(dev);
183 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
196 usbhid_submit_report(hid, report, USB_DIR_OUT);
200 static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range)
202 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
214 usbhid_submit_report(hid, report, USB_DIR_OUT);
218 static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range)
220 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
241 usbhid_submit_report(hid, report, USB_DIR_OUT);
253 usbhid_submit_report(hid, report, USB_DIR_OUT);
267 usbhid_submit_report(hid, report, USB_DIR_OUT);
270 static void hid_lg4ff_switch_native(struct hid_device *hid, const struct lg4ff_native_cmd *cmd)
272 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
281 usbhid_submit_report(hid, report, USB_DIR_OUT);
290 struct hid_device *hid = to_hid_device(dev);
295 if (strcmp(entry->device_id, (&hid->dev)->kobj.name) == 0)
313 struct hid_device *hid = to_hid_device(dev);
318 if (strcmp(entry->device_id, (&hid->dev)->kobj.name) == 0)
332 entry->set_range(hid, range);
339 int lg4ff_init(struct hid_device *hid)
341 struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
342 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
353 hid_err(hid, "No output report found\n");
360 hid_err(hid, "NULL output report\n");
366 hid_err(hid, "NULL field\n");
372 if (hid->product == lg4ff_devices[i].product_id) {
379 hid_err(hid, "Device is not supported by lg4ff driver. If you think it should be, consider reporting a bug to"
385 udesc = &(hid_to_usb_dev(hid)->descriptor);
387 hid_err(hid, "NULL USB device descriptor\n");
400 hid_lg4ff_switch_native(hid, lg4ff_revs[j].command);
401 hid_info(hid, "Switched to native mode\n");
435 hid_err(hid, "Cannot add device, insufficient memory.\n");
438 entry->device_id = kstrdup((&hid->dev)->kobj.name, GFP_KERNEL);
440 hid_err(hid, "Cannot set device_id, insufficient memory.\n");
450 error = device_create_file(&hid->dev, &dev_attr_range);
458 entry->set_range(hid, entry->range);
460 hid_info(hid, "Force feedback for Logitech Speed Force Wireless by Simon Wood <simon@mungewell.org>\n");
464 int lg4ff_deinit(struct hid_device *hid)
471 if (strcmp(entry->device_id, (&hid->dev)->kobj.name) == 0) {
485 device_remove_file(&hid->dev, &dev_attr_range);