drivers/tty/serial/mux.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/mux.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/mux.c- Extension
.c- Size
- 14288 bytes
- Lines
- 584
- Domain
- Driver Families
- Bucket
- drivers/tty
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/ioport.hlinux/init.hlinux/serial.hlinux/tty.hlinux/tty_flip.hlinux/console.hlinux/delay.hlinux/device.hlinux/io.hasm/irq.hasm/parisc-device.hlinux/sysrq.hlinux/serial_core.h
Detected Declarations
struct mux_portfunction get_mux_port_countfunction mux_tx_emptyfunction mux_set_mctrlfunction mux_stop_txfunction mux_writefunction mux_readfunction mux_startupfunction mux_shutdownfunction mux_set_termiosfunction mux_release_portfunction mux_config_portfunction mux_verify_portfunction mux_pollfunction mux_console_writefunction mux_console_setupfunction chipfunction mux_removefunction mux_initfunction mux_exitmodule init mux_init
Annotated Snippet
module_init(mux_init);
module_exit(mux_exit);
MODULE_AUTHOR("Ryan Bradetich");
MODULE_DESCRIPTION("Serial MUX driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS_CHARDEV_MAJOR(MUX_MAJOR);
Annotation
- Immediate include surface: `linux/module.h`, `linux/ioport.h`, `linux/init.h`, `linux/serial.h`, `linux/tty.h`, `linux/tty_flip.h`, `linux/console.h`, `linux/delay.h`.
- Detected declarations: `struct mux_port`, `function get_mux_port_count`, `function mux_tx_empty`, `function mux_set_mctrl`, `function mux_stop_tx`, `function mux_write`, `function mux_read`, `function mux_startup`, `function mux_shutdown`, `function mux_set_termios`.
- Atlas domain: Driver Families / drivers/tty.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.