#include <linux/filter.h>
#include <linux/bpf_lirc.h>
#include "rc-core-priv.h"
const struct bpf_prog_ops lirc_mode2_prog_ops = {
BPF_CALL_1(bpf_rc_repeat, u32*, sample)
struct ir_raw_event_ctrl *ctrl;
ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample);
static const struct bpf_func_proto rc_repeat_proto = {
.arg1_type = ARG_PTR_TO_CTX,
BPF_CALL_4(bpf_rc_keydown, u32*, sample, u32, protocol, u64, scancode,
struct ir_raw_event_ctrl *ctrl;
ctrl = container_of(sample, struct ir_raw_event_ctrl, bpf_sample);
rc_keydown(ctrl->dev, protocol, scancode, toggle != 0);
static const struct bpf_func_proto rc_keydown_proto = {
.arg1_type = ARG_PTR_TO_CTX,
.arg2_type = ARG_ANYTHING,
.arg3_type = ARG_ANYTHING,
.arg4_type = ARG_ANYTHING,
BPF_CALL_3(bpf_rc_pointer_rel, u32*, sample, s32, rel_x, s32, rel_y)