HID: bpf: allow to inject HID event from BPF
authorBenjamin Tissoires <bentiss@kernel.org>
Fri, 15 Mar 2024 14:44:42 +0000 (15:44 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Wed, 10 Apr 2024 14:38:11 +0000 (16:38 +0200)
commit9be50ac30a83896a753ab9f64e941763bb7900be
treebe748108a980cf8f48685694d8b3ffee573c6ee5
parentdb624e82c55f227b84ac9ebfa3de2f6f5fad666b
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>
Documentation/hid/hid-bpf.rst
drivers/hid/bpf/hid_bpf_dispatch.c
drivers/hid/hid-core.c
include/linux/hid_bpf.h