drivers/media/rc/rc-core-priv.h
Source file repositories/reference/linux-study-clean/drivers/media/rc/rc-core-priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/rc/rc-core-priv.h- Extension
.h- Size
- 9226 bytes
- Lines
- 352
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/slab.huapi/linux/bpf.hmedia/rc-core.h
Detected Declarations
struct ir_raw_handlerstruct ir_raw_event_ctrlstruct nec_decstruct rc5_decstruct rc6_decstruct sony_decstruct jvc_decstruct sanyo_decstruct sharp_decstruct mce_kbd_decstruct xmp_decstruct imon_decstruct rcmm_decstruct ir_raw_timings_manchesterstruct ir_raw_timings_pdstruct ir_raw_timings_plfunction geq_marginfunction eq_marginfunction is_transitionfunction decrease_durationfunction is_timing_eventfunction init_ir_raw_event_durationfunction ir_raw_gen_pulse_spacefunction lirc_dev_initfunction lirc_dev_exitfunction lirc_unregisterfunction lirc_bpf_free
Annotated Snippet
struct ir_raw_handler {
struct list_head list;
u64 protocols; /* which are handled by this handler */
int (*decode)(struct rc_dev *dev, struct ir_raw_event event);
int (*encode)(enum rc_proto protocol, u32 scancode,
struct ir_raw_event *events, unsigned int max);
u32 carrier;
u32 min_timeout;
/* These two should only be used by the mce kbd decoder */
int (*raw_register)(struct rc_dev *dev);
int (*raw_unregister)(struct rc_dev *dev);
};
struct ir_raw_event_ctrl {
struct list_head list; /* to keep track of raw clients */
struct task_struct *thread;
/* fifo for the pulse/space durations */
DECLARE_KFIFO(kfifo, struct ir_raw_event, MAX_IR_EVENT_SIZE);
ktime_t last_event; /* when last event occurred */
struct rc_dev *dev; /* pointer to the parent rc_dev */
/* handle delayed ir_raw_event_store_edge processing */
spinlock_t edge_spinlock;
struct timer_list edge_handle;
/* raw decoder state follows */
struct ir_raw_event prev_ev;
struct ir_raw_event this_ev;
#ifdef CONFIG_BPF_LIRC_MODE2
u32 bpf_sample;
struct bpf_prog_array __rcu *progs;
#endif
#if IS_ENABLED(CONFIG_IR_NEC_DECODER)
struct nec_dec {
int state;
unsigned count;
u32 bits;
bool is_nec_x;
bool necx_repeat;
} nec;
#endif
#if IS_ENABLED(CONFIG_IR_RC5_DECODER)
struct rc5_dec {
int state;
u32 bits;
unsigned count;
bool is_rc5x;
} rc5;
#endif
#if IS_ENABLED(CONFIG_IR_RC6_DECODER)
struct rc6_dec {
int state;
u8 header;
bool toggle;
u32 body;
unsigned count;
unsigned wanted_bits;
} rc6;
#endif
#if IS_ENABLED(CONFIG_IR_SONY_DECODER)
struct sony_dec {
int state;
u32 bits;
unsigned count;
} sony;
#endif
#if IS_ENABLED(CONFIG_IR_JVC_DECODER)
struct jvc_dec {
int state;
u16 bits;
u16 old_bits;
unsigned count;
bool first;
bool toggle;
} jvc;
#endif
#if IS_ENABLED(CONFIG_IR_SANYO_DECODER)
struct sanyo_dec {
int state;
unsigned count;
u64 bits;
} sanyo;
#endif
#if IS_ENABLED(CONFIG_IR_SHARP_DECODER)
struct sharp_dec {
int state;
unsigned count;
u32 bits;
Annotation
- Immediate include surface: `linux/slab.h`, `uapi/linux/bpf.h`, `media/rc-core.h`.
- Detected declarations: `struct ir_raw_handler`, `struct ir_raw_event_ctrl`, `struct nec_dec`, `struct rc5_dec`, `struct rc6_dec`, `struct sony_dec`, `struct jvc_dec`, `struct sanyo_dec`, `struct sharp_dec`, `struct mce_kbd_dec`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.