include/media/rc-core.h
Source file repositories/reference/linux-study-clean/include/media/rc-core.h
File Facts
- System
- Linux kernel
- Corpus path
include/media/rc-core.h- Extension
.h- Size
- 12273 bytes
- Lines
- 376
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/spinlock.hlinux/cdev.hlinux/kfifo.hlinux/time.hlinux/timer.hmedia/rc-map.h
Detected Declarations
struct rc_scancode_filterstruct lirc_fhstruct rc_devstruct ir_raw_eventenum rc_driver_typeenum rc_filter_typefunction ir_raw_event_overflowfunction ir_extract_bitsfunction ir_nec_bytes_to_scancode
Annotated Snippet
struct rc_scancode_filter {
u32 data;
u32 mask;
};
/**
* enum rc_filter_type - Filter type constants.
* @RC_FILTER_NORMAL: Filter for normal operation.
* @RC_FILTER_WAKEUP: Filter for waking from suspend.
* @RC_FILTER_MAX: Number of filter types.
*/
enum rc_filter_type {
RC_FILTER_NORMAL = 0,
RC_FILTER_WAKEUP,
RC_FILTER_MAX
};
/**
* struct lirc_fh - represents an open lirc file
* @list: list of open file handles
* @rc: rcdev for this lirc chardev
* @rawir: queue for incoming raw IR
* @scancodes: queue for incoming decoded scancodes
* @wait_poll: poll struct for lirc device
* @carrier_low: when setting the carrier range, first the low end must be
* set with an ioctl and then the high end with another ioctl
* @send_mode: lirc mode for sending, either LIRC_MODE_SCANCODE or
* LIRC_MODE_PULSE
* @rec_mode: lirc mode for receiving, either LIRC_MODE_SCANCODE or
* LIRC_MODE_MODE2
*/
struct lirc_fh {
struct list_head list;
struct rc_dev *rc;
DECLARE_KFIFO_PTR(rawir, unsigned int);
DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode);
wait_queue_head_t wait_poll;
u32 carrier_low;
u8 send_mode;
u8 rec_mode;
};
/**
* struct rc_dev - represents a remote control device
* @dev: driver model's view of this device
* @registered: set to true by rc_register_device(), false by
* rc_unregister_device
* @idle: used to keep track of RX state
* @encode_wakeup: wakeup filtering uses IR encode API, therefore the allowed
* wakeup protocols is the set of all raw encoders
* @minor: unique minor remote control device number
* @sysfs_groups: sysfs attribute groups
* @device_name: name of the rc child device
* @input_phys: physical path to the input child device
* @input_id: id of the input child device (struct input_id)
* @driver_name: name of the hardware driver which registered this device
* @map_name: name of the default keymap
* @rc_map: current scan/key table
* @lock: used to ensure we've filled in all protocol details before
* anyone can call show_protocols or store_protocols
* @raw: additional data for raw pulse/space devices
* @input_dev: the input child device used to communicate events to userspace
* @driver_type: specifies if protocol decoding is done in hardware or software
* @users: number of current users of the device
* @allowed_protocols: bitmask with the supported RC_PROTO_BIT_* protocols
* @enabled_protocols: bitmask with the enabled RC_PROTO_BIT_* protocols
* @allowed_wakeup_protocols: bitmask with the supported RC_PROTO_BIT_* wakeup
* protocols
* @wakeup_protocol: the enabled RC_PROTO_* wakeup protocol or
* RC_PROTO_UNKNOWN if disabled.
* @scancode_filter: scancode filter
* @scancode_wakeup_filter: scancode wakeup filters
* @scancode_mask: some hardware decoders are not capable of providing the full
* scancode to the application. As this is a hardware limit, we can't do
* anything with it. Yet, as the same keycode table can be used with other
* devices, a mask is provided to allow its usage. Drivers should generally
* leave this field in blank
* @priv: driver-specific data
* @keylock: protects the remaining members of the struct
* @keypressed: whether a key is currently pressed
* @last_toggle: toggle value of last command
* @last_keycode: keycode of last keypress
* @last_protocol: protocol of last keypress
* @last_scancode: scancode of last keypress
* @keyup_jiffies: time (in jiffies) when the current keypress should be released
* @timer_keyup: timer for releasing a keypress
* @timer_repeat: timer for autorepeat events. This is needed for CEC, which
* has non-standard repeats.
* @timeout: optional time after which device stops sending data
Annotation
- Immediate include surface: `linux/spinlock.h`, `linux/cdev.h`, `linux/kfifo.h`, `linux/time.h`, `linux/timer.h`, `media/rc-map.h`.
- Detected declarations: `struct rc_scancode_filter`, `struct lirc_fh`, `struct rc_dev`, `struct ir_raw_event`, `enum rc_driver_type`, `enum rc_filter_type`, `function ir_raw_event_overflow`, `function ir_extract_bits`, `function ir_nec_bytes_to_scancode`.
- Atlas domain: Repository Root And Misc / include.
- 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.