1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/hid/bpf/progs/hid_bpf.h
Benjamin Tissoires 04b3e5ab05 HID: bpf: add first in-tree HID-BPF fix for the XPPen Artist 24
This commit adds a fix for XPPen Artist 24 where the second button on
the pen is used as an eraser.

It's a "feature" from Microsoft, but it turns out that it's actually
painful for artists. So we ship here a HID-BPF program that turns this
second button into an actual button.

Note that the HID-BPF program is not directly loaded by the kernel itself
but by udev-hid-bpf[0]. But having the sources here allows us to also
integrate tests into tools/testing/selftests/hid to ensure the HID-BPF
program are actually tested.

[0] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-2-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-05-07 15:38:53 +02:00

15 lines
283 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2022 Benjamin Tissoires
*/
#ifndef ____HID_BPF__H
#define ____HID_BPF__H
struct hid_bpf_probe_args {
unsigned int hid;
unsigned int rdesc_size;
unsigned char rdesc[4096];
int retval;
};
#endif /* ____HID_BPF__H */