drivers/tty/serial/liteuart.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/liteuart.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/liteuart.c- Extension
.c- Size
- 11374 bytes
- Lines
- 479
- 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.
- 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/bits.hlinux/console.hlinux/interrupt.hlinux/litex.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/serial.hlinux/serial_core.hlinux/slab.hlinux/timer.hlinux/tty_flip.hlinux/xarray.h
Detected Declarations
struct liteuart_portfunction liteuart_update_irq_regfunction liteuart_stop_txfunction liteuart_start_txfunction liteuart_stop_rxfunction liteuart_rx_charsfunction liteuart_tx_charsfunction liteuart_interruptfunction liteuart_timerfunction liteuart_tx_emptyfunction liteuart_set_mctrlfunction liteuart_startupfunction liteuart_shutdownfunction liteuart_set_termiosfunction liteuart_config_portfunction liteuart_verify_portfunction liteuart_probefunction liteuart_removefunction liteuart_putcharfunction liteuart_console_writefunction liteuart_console_setupfunction liteuart_console_initfunction early_liteuart_writefunction early_liteuart_setupfunction liteuart_initfunction liteuart_exitmodule init liteuart_init
Annotated Snippet
module_init(liteuart_init);
module_exit(liteuart_exit);
MODULE_AUTHOR("Antmicro <www.antmicro.com>");
MODULE_DESCRIPTION("LiteUART serial driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:liteuart");
Annotation
- Immediate include surface: `linux/bits.h`, `linux/console.h`, `linux/interrupt.h`, `linux/litex.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/serial.h`.
- Detected declarations: `struct liteuart_port`, `function liteuart_update_irq_reg`, `function liteuart_stop_tx`, `function liteuart_start_tx`, `function liteuart_stop_rx`, `function liteuart_rx_chars`, `function liteuart_tx_chars`, `function liteuart_interrupt`, `function liteuart_timer`, `function liteuart_tx_empty`.
- 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.
- 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.