summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/Kconfig
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-05-27 12:24:09 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-30 12:38:40 +0200
commitf4364dcfc86df7c1ca47b256eaf6b6d0cdd0d936 (patch)
treeaa0d09b48734429acec8d26b703db839fcc655de /drivers/media/rc/Kconfig
parent170a7e3ea0709eae12c8f944b9f33c54fe80c6c1 (diff)
downloadlinux-f4364dcfc86df7c1ca47b256eaf6b6d0cdd0d936.tar.bz2
media: rc: introduce BPF_PROG_LIRC_MODE2
Add support for BPF_PROG_LIRC_MODE2. This type of BPF program can call rc_keydown() to reported decoded IR scancodes, or rc_repeat() to report that the last key should be repeated. The bpf program can be attached to using the bpf(BPF_PROG_ATTACH) syscall; the target_fd must be the /dev/lircN device. Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/media/rc/Kconfig')
-rw-r--r--drivers/media/rc/Kconfig13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index eb2c3b6eca7f..d5b35a6ba899 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -25,6 +25,19 @@ config LIRC
passes raw IR to and from userspace, which is needed for
IR transmitting (aka "blasting") and for the lirc daemon.
+config BPF_LIRC_MODE2
+ bool "Support for eBPF programs attached to lirc devices"
+ depends on BPF_SYSCALL
+ depends on RC_CORE=y
+ depends on LIRC
+ help
+ Allow attaching eBPF programs to a lirc device using the bpf(2)
+ syscall command BPF_PROG_ATTACH. This is supported for raw IR
+ receivers.
+
+ These eBPF programs can be used to decode IR into scancodes, for
+ IR protocols not supported by the kernel decoders.
+
menuconfig RC_DECODERS
bool "Remote controller decoders"
depends on RC_CORE