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 /drivers/hid/hid-core.c | |
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 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 1243595890ba..b1fa0378e8f4 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2975,6 +2975,7 @@ static struct hid_bpf_ops hid_ops = { .hid_get_report = hid_get_report, .hid_hw_raw_request = hid_hw_raw_request, .hid_hw_output_report = hid_hw_output_report, + .hid_input_report = hid_input_report, .owner = THIS_MODULE, .bus_type = &hid_bus_type, }; |