drivers/media/rc/mceusb.c
Source file repositories/reference/linux-study-clean/drivers/media/rc/mceusb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/rc/mceusb.c- Extension
.c- Size
- 54664 bytes
- Lines
- 1891
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/module.hlinux/slab.hlinux/workqueue.hlinux/usb.hlinux/usb/input.hmedia/rc-core.h
Detected Declarations
struct mceusb_modelstruct mceusb_devenum mceusb_model_typefunction mceusb_cmd_datasizefunction mceusb_dev_printdatafunction mceusb_deferred_keventfunction mce_write_callbackfunction Writefunction mce_command_outfunction portfunction mceusb_set_tx_maskfunction mceusb_set_tx_carrierfunction mceusb_set_timeoutfunction receiverfunction mceusb_set_rx_carrier_reportfunction normalfunction datafunction mceusb_process_ir_datafunction mceusb_dev_recvfunction mceusb_get_emulator_versionfunction mceusb_gen1_initfunction mceusb_gen2_initfunction mceusb_get_parametersfunction mceusb_flash_ledfunction runsfunction mceusb_dev_probefunction mceusb_dev_disconnectfunction mceusb_dev_suspendfunction mceusb_dev_resume
Annotated Snippet
struct mceusb_model {
u32 mce_gen1:1;
u32 mce_gen2:1;
u32 mce_gen3:1;
u32 tx_mask_normal:1;
u32 no_tx:1;
u32 broken_irtimeout:1;
/*
* 2nd IR receiver (short-range, wideband) for learning mode:
* 0, absent 2nd receiver (rx2)
* 1, rx2 present
* 2, rx2 which under counts IR carrier cycles
*/
u32 rx2;
int ir_intfnum;
const char *rc_map; /* Allow specify a per-board map */
const char *name; /* per-board name */
};
static const struct mceusb_model mceusb_model[] = {
[MCE_GEN1] = {
.mce_gen1 = 1,
.tx_mask_normal = 1,
.rx2 = 2,
},
[MCE_GEN2] = {
.mce_gen2 = 1,
.rx2 = 2,
},
[MCE_GEN2_NO_TX] = {
.mce_gen2 = 1,
.no_tx = 1,
},
[MCE_GEN2_TX_INV] = {
.mce_gen2 = 1,
.tx_mask_normal = 1,
.rx2 = 1,
},
[MCE_GEN2_TX_INV_RX_GOOD] = {
.mce_gen2 = 1,
.tx_mask_normal = 1,
.rx2 = 2,
},
[MCE_GEN3] = {
.mce_gen3 = 1,
.tx_mask_normal = 1,
.rx2 = 2,
},
[MCE_GEN3_BROKEN_IRTIMEOUT] = {
.mce_gen3 = 1,
.tx_mask_normal = 1,
.rx2 = 2,
.broken_irtimeout = 1
},
[POLARIS_EVK] = {
/*
* In fact, the EVK is shipped without
* remotes, but we should have something handy,
* to allow testing it
*/
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
.rx2 = 2,
},
[CX_HYBRID_TV] = {
.no_tx = 1, /* tx isn't wired up at all */
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
},
[HAUPPAUGE_CX_HYBRID_TV] = {
.no_tx = 1, /* eeprom says it has no tx */
.name = "Conexant Hybrid TV (cx231xx) MCE IR no TX",
},
[MULTIFUNCTION] = {
.mce_gen2 = 1,
.ir_intfnum = 2,
.rx2 = 2,
},
[TIVO_KIT] = {
.mce_gen2 = 1,
.rc_map = RC_MAP_TIVO,
.rx2 = 2,
},
[EVROMEDIA_FULL_HYBRID_FULLHD] = {
.name = "Evromedia USB Full Hybrid Full HD",
.no_tx = 1,
.rc_map = RC_MAP_MSI_DIGIVOX_III,
},
[ASTROMETA_T2HYBRID] = {
.name = "Astrometa T2Hybrid",
Annotation
- Immediate include surface: `linux/device.h`, `linux/module.h`, `linux/slab.h`, `linux/workqueue.h`, `linux/usb.h`, `linux/usb/input.h`, `media/rc-core.h`.
- Detected declarations: `struct mceusb_model`, `struct mceusb_dev`, `enum mceusb_model_type`, `function mceusb_cmd_datasize`, `function mceusb_dev_printdata`, `function mceusb_deferred_kevent`, `function mce_write_callback`, `function Write`, `function mce_command_out`, `function port`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.