OSDN Git Service

media: rc: introduce BPF_PROG_LIRC_MODE2
authorSean Young <sean@mess.org>
Sun, 27 May 2018 11:24:09 +0000 (12:24 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 30 May 2018 10:38:40 +0000 (12:38 +0200)
commitf4364dcfc86df7c1ca47b256eaf6b6d0cdd0d936
treeaa0d09b48734429acec8d26b703db839fcc655de
parent170a7e3ea0709eae12c8f944b9f33c54fe80c6c1
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>
drivers/media/rc/Kconfig
drivers/media/rc/Makefile
drivers/media/rc/bpf-lirc.c [new file with mode: 0644]
drivers/media/rc/lirc_dev.c
drivers/media/rc/rc-core-priv.h
drivers/media/rc/rc-ir-raw.c
include/linux/bpf_lirc.h [new file with mode: 0644]
include/linux/bpf_types.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c