Lines Matching refs:hdev

113 static inline int ntrig_get_mode(struct hid_device *hdev)  in ntrig_get_mode()  argument
115 struct hid_report *report = hdev->report_enum[HID_FEATURE_REPORT]. in ntrig_get_mode()
122 hid_hw_request(hdev, report, HID_REQ_GET_REPORT); in ntrig_get_mode()
123 hid_hw_wait(hdev); in ntrig_get_mode()
127 static inline void ntrig_set_mode(struct hid_device *hdev, const int mode) in ntrig_set_mode() argument
135 report = hdev->report_enum[HID_FEATURE_REPORT]. in ntrig_set_mode()
141 hid_hw_request(hdev, report, HID_REQ_GET_REPORT); in ntrig_set_mode()
144 static void ntrig_report_version(struct hid_device *hdev) in ntrig_report_version() argument
148 struct usb_device *usb_dev = hid_to_usb_dev(hdev); in ntrig_report_version()
164 hid_info(hdev, "Firmware version: %s (%02x%02x %02x%02x)\n", in ntrig_report_version()
176 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_phys_width() local
177 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_phys_width()
188 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_phys_height() local
189 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_phys_height()
200 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_log_width() local
201 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_log_width()
212 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_log_height() local
213 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_log_height()
224 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_min_width() local
225 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_min_width()
236 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_min_width() local
237 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_min_width()
259 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_min_height() local
260 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_min_height()
271 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_min_height() local
272 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_min_height()
295 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_activate_slack() local
296 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_activate_slack()
305 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_activate_slack() local
306 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_activate_slack()
328 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_activation_width() local
329 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_activation_width()
340 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_activation_width() local
341 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_activation_width()
364 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_activation_height() local
365 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_activation_height()
376 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_activation_height() local
377 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_activation_height()
400 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in show_deactivate_slack() local
401 struct ntrig_data *nd = hid_get_drvdata(hdev); in show_deactivate_slack()
410 struct hid_device *hdev = container_of(dev, struct hid_device, dev); in set_deactivate_slack() local
411 struct ntrig_data *nd = hid_get_drvdata(hdev); in set_deactivate_slack()
458 static int ntrig_input_mapping(struct hid_device *hdev, struct hid_input *hi, in ntrig_input_mapping() argument
462 struct ntrig_data *nd = hid_get_drvdata(hdev); in ntrig_input_mapping()
549 static int ntrig_input_mapped(struct hid_device *hdev, struct hid_input *hi, in ntrig_input_mapped() argument
895 static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) in ntrig_probe() argument
902 hdev->quirks |= HID_QUIRK_MULTI_INPUT in ntrig_probe()
907 hid_err(hdev, "cannot allocate N-Trig data\n"); in ntrig_probe()
922 hid_set_drvdata(hdev, nd); in ntrig_probe()
924 ret = hid_parse(hdev); in ntrig_probe()
926 hid_err(hdev, "parse failed\n"); in ntrig_probe()
930 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); in ntrig_probe()
932 hid_err(hdev, "hw start failed\n"); in ntrig_probe()
937 report = hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0x0a]; in ntrig_probe()
941 hid_hw_wait(hdev); in ntrig_probe()
942 hid_hw_request(hdev, report, HID_REQ_GET_REPORT); in ntrig_probe()
948 if (ntrig_get_mode(hdev) >= 4) in ntrig_probe()
949 ntrig_set_mode(hdev, 3); in ntrig_probe()
952 ntrig_report_version(hdev); in ntrig_probe()
954 ret = sysfs_create_group(&hdev->dev.kobj, in ntrig_probe()
963 static void ntrig_remove(struct hid_device *hdev) in ntrig_remove() argument
965 sysfs_remove_group(&hdev->dev.kobj, in ntrig_remove()
967 hid_hw_stop(hdev); in ntrig_remove()
968 kfree(hid_get_drvdata(hdev)); in ntrig_remove()