Lines Matching defs:hdev

109 static inline int ntrig_get_mode(struct hid_device *hdev)
111 struct hid_report *report = hdev->report_enum[HID_FEATURE_REPORT].
118 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
119 hid_hw_wait(hdev);
123 static inline void ntrig_set_mode(struct hid_device *hdev, const int mode)
131 report = hdev->report_enum[HID_FEATURE_REPORT].
137 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
140 static void ntrig_report_version(struct hid_device *hdev)
144 struct usb_device *usb_dev = hid_to_usb_dev(hdev);
160 hid_info(hdev, "Firmware version: %s (%02x%02x %02x%02x)\n",
172 struct hid_device *hdev = to_hid_device(dev);
173 struct ntrig_data *nd = hid_get_drvdata(hdev);
184 struct hid_device *hdev = to_hid_device(dev);
185 struct ntrig_data *nd = hid_get_drvdata(hdev);
196 struct hid_device *hdev = to_hid_device(dev);
197 struct ntrig_data *nd = hid_get_drvdata(hdev);
208 struct hid_device *hdev = to_hid_device(dev);
209 struct ntrig_data *nd = hid_get_drvdata(hdev);
220 struct hid_device *hdev = to_hid_device(dev);
221 struct ntrig_data *nd = hid_get_drvdata(hdev);
232 struct hid_device *hdev = to_hid_device(dev);
233 struct ntrig_data *nd = hid_get_drvdata(hdev);
255 struct hid_device *hdev = to_hid_device(dev);
256 struct ntrig_data *nd = hid_get_drvdata(hdev);
267 struct hid_device *hdev = to_hid_device(dev);
268 struct ntrig_data *nd = hid_get_drvdata(hdev);
291 struct hid_device *hdev = to_hid_device(dev);
292 struct ntrig_data *nd = hid_get_drvdata(hdev);
301 struct hid_device *hdev = to_hid_device(dev);
302 struct ntrig_data *nd = hid_get_drvdata(hdev);
324 struct hid_device *hdev = to_hid_device(dev);
325 struct ntrig_data *nd = hid_get_drvdata(hdev);
336 struct hid_device *hdev = to_hid_device(dev);
337 struct ntrig_data *nd = hid_get_drvdata(hdev);
360 struct hid_device *hdev = to_hid_device(dev);
361 struct ntrig_data *nd = hid_get_drvdata(hdev);
372 struct hid_device *hdev = to_hid_device(dev);
373 struct ntrig_data *nd = hid_get_drvdata(hdev);
396 struct hid_device *hdev = to_hid_device(dev);
397 struct ntrig_data *nd = hid_get_drvdata(hdev);
406 struct hid_device *hdev = to_hid_device(dev);
407 struct ntrig_data *nd = hid_get_drvdata(hdev);
454 static int ntrig_input_mapping(struct hid_device *hdev, struct hid_input *hi,
458 struct ntrig_data *nd = hid_get_drvdata(hdev);
545 static int ntrig_input_mapped(struct hid_device *hdev, struct hid_input *hi,
893 static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
900 hdev->quirks |= HID_QUIRK_MULTI_INPUT
905 hid_err(hdev, "cannot allocate N-Trig data\n");
920 hid_set_drvdata(hdev, nd);
922 ret = hid_parse(hdev);
924 hid_err(hdev, "parse failed\n");
928 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
930 hid_err(hdev, "hw start failed\n");
935 report = hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0x0a];
939 hid_hw_wait(hdev);
940 hid_hw_request(hdev, report, HID_REQ_GET_REPORT);
946 if (ntrig_get_mode(hdev) >= 4)
947 ntrig_set_mode(hdev, 3);
950 ntrig_report_version(hdev);
952 ret = sysfs_create_group(&hdev->dev.kobj,
955 hid_err(hdev, "cannot create sysfs group\n");
963 static void ntrig_remove(struct hid_device *hdev)
965 sysfs_remove_group(&hdev->dev.kobj,
967 hid_hw_stop(hdev);
968 kfree(hid_get_drvdata(hdev));