Lines Matching refs:hdev

660 void hid_debug_event(struct hid_device *hdev, char *buf)  in hid_debug_event()  argument
666 spin_lock_irqsave(&hdev->debug_list_lock, flags); in hid_debug_event()
667 list_for_each_entry(list, &hdev->debug_list, node) { in hid_debug_event()
673 spin_unlock_irqrestore(&hdev->debug_list_lock, flags); in hid_debug_event()
675 wake_up_interruptible(&hdev->debug_wait); in hid_debug_event()
709 void hid_dump_input(struct hid_device *hdev, struct hid_usage *usage, __s32 value) in hid_dump_input() argument
720 hid_debug_event(hdev, buf); in hid_dump_input()
723 wake_up_interruptible(&hdev->debug_wait); in hid_dump_input()
1050 struct hid_device *hdev = f->private; in hid_debug_rdesc_show() local
1051 const __u8 *rdesc = hdev->rdesc; in hid_debug_rdesc_show()
1052 unsigned rsize = hdev->rsize; in hid_debug_rdesc_show()
1056 rdesc = hdev->dev_rdesc; in hid_debug_rdesc_show()
1057 rsize = hdev->dev_rsize; in hid_debug_rdesc_show()
1066 hid_dump_device(hdev, f); in hid_debug_rdesc_show()
1068 hid_dump_input_mapping(hdev, f); in hid_debug_rdesc_show()
1094 list->hdev = (struct hid_device *) inode->i_private; in hid_debug_events_open()
1098 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1099 list_add_tail(&list->node, &list->hdev->debug_list); in hid_debug_events_open()
1100 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_open()
1116 add_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1129 if (!list->hdev || !list->hdev->debug) { in hid_debug_events_read()
1143 remove_wait_queue(&list->hdev->debug_wait, &wait); in hid_debug_events_read()
1184 poll_wait(file, &list->hdev->debug_wait, wait); in hid_debug_events_poll()
1187 if (!list->hdev->debug) in hid_debug_events_poll()
1197 spin_lock_irqsave(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1199 spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags); in hid_debug_events_release()
1223 void hid_debug_register(struct hid_device *hdev, const char *name) in hid_debug_register() argument
1225 hdev->debug_dir = debugfs_create_dir(name, hid_debug_root); in hid_debug_register()
1226 hdev->debug_rdesc = debugfs_create_file("rdesc", 0400, in hid_debug_register()
1227 hdev->debug_dir, hdev, &hid_debug_rdesc_fops); in hid_debug_register()
1228 hdev->debug_events = debugfs_create_file("events", 0400, in hid_debug_register()
1229 hdev->debug_dir, hdev, &hid_debug_events_fops); in hid_debug_register()
1230 hdev->debug = 1; in hid_debug_register()
1233 void hid_debug_unregister(struct hid_device *hdev) in hid_debug_unregister() argument
1235 hdev->debug = 0; in hid_debug_unregister()
1236 wake_up_interruptible(&hdev->debug_wait); in hid_debug_unregister()
1237 debugfs_remove(hdev->debug_rdesc); in hid_debug_unregister()
1238 debugfs_remove(hdev->debug_events); in hid_debug_unregister()
1239 debugfs_remove(hdev->debug_dir); in hid_debug_unregister()