Lines Matching full:hid

4  *  HID-BPF support for Linux
14 #include <linux/hid.h>
33 .hid = hdev,
92 .hid = hdev,
132 .hid = hdev,
168 .hid = hdev,
223 void hid_put_device(struct hid_device *hid)
225 put_device(&hid->dev);
290 * @ctx: The HID-BPF context
312 * hid_bpf_allocate_context - Allocate a context to the given HID device
314 * @hid_id: the system unique identifier of the HID device
334 ctx_kern->ctx.hid = hdev;
342 * @ctx: the HID-BPF context to release
349 struct hid_device *hid;
352 hid = (struct hid_device *)ctx_kern->ctx.hid; /* ignore const */
357 hid_put_device(hid);
384 report_enum = ctx->hid->report_enum + rtype;
402 * hid_bpf_hw_request - Communicate with a HID device
404 * @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
447 ret = hid_ops->hid_hw_raw_request(ctx->hid,
466 * hid_bpf_hw_output_report - Send an output report to a HID device
468 * @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
495 ret = hid_ops->hid_hw_output_report(ctx->hid, dma_data, size, (u64)(long)ctx, true);
517 return hid_ops->hid_input_report(ctx->hid, type, buf, size, size, 0, (u64)(long)ctx, true,
522 * hid_bpf_try_input_report - Inject a HID report in the kernel from a HID device
524 * @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
540 from_hid_event_hook = ctx_kern->data && ctx_kern->data == ctx->hid->bpf.device_data;
546 * hid_bpf_input_report - Inject a HID report in the kernel from a HID device
548 * @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
563 ret = down_interruptible(&ctx->hid->driver_input_lock);
570 up(&ctx->hid->driver_input_lock);
595 /* for syscall HID-BPF */
666 /* Note: if we exit with an error any time here, we would entirely break HID, which
674 pr_warn("error while setting HID BPF tracing kfuncs: %d", err);
680 pr_warn("error while setting HID BPF syscall kfuncs: %d", err);