#ifndef _RC_CORE_PRIV
#define _RC_CORE_PRIV
#define RC_DEV_MAX …
#define MAX_IR_EVENT_SIZE …
#include <linux/slab.h>
#include <uapi/linux/bpf.h>
#include <media/rc-core.h>
int rc_open(struct rc_dev *rdev);
void rc_close(struct rc_dev *rdev);
struct ir_raw_handler { … };
struct ir_raw_event_ctrl { … };
extern struct mutex ir_raw_handler_lock;
static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin)
{ … }
static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin)
{ … }
static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y)
{ … }
static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration)
{ … }
static inline bool is_timing_event(struct ir_raw_event ev)
{ … }
#define TO_STR(is_pulse) …
bool rc_validate_scancode(enum rc_proto proto, u32 scancode);
static inline void init_ir_raw_event_duration(struct ir_raw_event *ev,
unsigned int pulse,
u32 duration)
{ … }
struct ir_raw_timings_manchester { … };
int ir_raw_gen_manchester(struct ir_raw_event **ev, unsigned int max,
const struct ir_raw_timings_manchester *timings,
unsigned int n, u64 data);
static inline int ir_raw_gen_pulse_space(struct ir_raw_event **ev,
unsigned int *max,
unsigned int pulse_width,
unsigned int space_width)
{ … }
struct ir_raw_timings_pd { … };
int ir_raw_gen_pd(struct ir_raw_event **ev, unsigned int max,
const struct ir_raw_timings_pd *timings,
unsigned int n, u64 data);
struct ir_raw_timings_pl { … };
int ir_raw_gen_pl(struct ir_raw_event **ev, unsigned int max,
const struct ir_raw_timings_pl *timings,
unsigned int n, u64 data);
u64 ir_raw_get_allowed_protocols(void);
int ir_raw_event_prepare(struct rc_dev *dev);
int ir_raw_event_register(struct rc_dev *dev);
void ir_raw_event_free(struct rc_dev *dev);
void ir_raw_event_unregister(struct rc_dev *dev);
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
void ir_raw_load_modules(u64 *protocols);
void ir_raw_init(void);
#ifdef CONFIG_LIRC
int lirc_dev_init(void);
void lirc_dev_exit(void);
void lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev);
void lirc_scancode_event(struct rc_dev *dev, struct lirc_scancode *lsc);
int lirc_register(struct rc_dev *dev);
void lirc_unregister(struct rc_dev *dev);
struct rc_dev *rc_dev_get_from_fd(int fd, bool write);
#else
static inline int lirc_dev_init(void) { return 0; }
static inline void lirc_dev_exit(void) {}
static inline void lirc_raw_event(struct rc_dev *dev,
struct ir_raw_event ev) { }
static inline void lirc_scancode_event(struct rc_dev *dev,
struct lirc_scancode *lsc) { }
static inline int lirc_register(struct rc_dev *dev) { return 0; }
static inline void lirc_unregister(struct rc_dev *dev) { }
#endif
#ifdef CONFIG_BPF_LIRC_MODE2
void lirc_bpf_free(struct rc_dev *dev);
void lirc_bpf_run(struct rc_dev *dev, u32 sample);
#else
static inline void lirc_bpf_free(struct rc_dev *dev) { }
static inline void lirc_bpf_run(struct rc_dev *dev, u32 sample) { }
#endif
#endif