diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2024-03-15 15:44:42 +0100 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-04-10 16:38:11 +0200 |
commit | 9be50ac30a83896a753ab9f64e941763bb7900be (patch) | |
tree | be748108a980cf8f48685694d8b3ffee573c6ee5 /include/linux/hid_bpf.h | |
parent | db624e82c55f227b84ac9ebfa3de2f6f5fad666b (diff) |
HID: bpf: allow to inject HID event from BPF
It can be interesting to inject events from BPF as if the event were
to come from the device.
For example, some multitouch devices do not all the time send a proximity
out event, and we might want to send it for the physical device.
Compared to uhid, we can now inject events on any physical device, not
just uhid virtual ones.
Link: https://lore.kernel.org/r/20240315-b4-hid-bpf-new-funcs-v4-5-079c282469d3@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'include/linux/hid_bpf.h')
-rw-r--r-- | include/linux/hid_bpf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/hid_bpf.h b/include/linux/hid_bpf.h index 5c7ff93dc73e..17b08f500098 100644 --- a/include/linux/hid_bpf.h +++ b/include/linux/hid_bpf.h @@ -104,6 +104,8 @@ struct hid_bpf_ops { size_t len, enum hid_report_type rtype, enum hid_class_request reqtype); int (*hid_hw_output_report)(struct hid_device *hdev, __u8 *buf, size_t len); + int (*hid_input_report)(struct hid_device *hid, enum hid_report_type type, + u8 *data, u32 size, int interrupt); struct module *owner; const struct bus_type *bus_type; }; |