drivers/tty/serial/stm32-usart.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/stm32-usart.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/stm32-usart.c- Extension
.c- Size
- 61684 bytes
- Lines
- 2227
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/clk.hlinux/console.hlinux/delay.hlinux/dma-direction.hlinux/dmaengine.hlinux/dma-mapping.hlinux/io.hlinux/iopoll.hlinux/irq.hlinux/module.hlinux/of.hlinux/of_platform.hlinux/pinctrl/consumer.hlinux/platform_device.hlinux/pm_runtime.hlinux/pm_wakeirq.hlinux/serial_core.hlinux/serial.hlinux/spinlock.hlinux/sysrq.hlinux/tty_flip.hlinux/tty.hserial_mctrl_gpio.hstm32-usart.h
Detected Declarations
struct stm32_usart_thresh_ratiofunction stm32_usart_set_bitsfunction stm32_usart_clr_bitsfunction stm32_usart_tx_emptyfunction stm32_usart_rs485_rts_enablefunction stm32_usart_rs485_rts_disablefunction stm32_usart_config_reg_rs485function stm32_usart_config_rs485function stm32_usart_init_rs485function stm32_usart_rx_dma_startedfunction stm32_usart_rx_dma_terminatefunction stm32_usart_dma_pause_resumefunction stm32_usart_rx_dma_pausefunction stm32_usart_rx_dma_resumefunction stm32_usart_pending_rx_piofunction stm32_usart_get_char_piofunction stm32_usart_receive_chars_piofunction stm32_usart_push_buffer_dmafunction stm32_usart_receive_chars_dmafunction stm32_usart_receive_charsfunction stm32_usart_rx_dma_completefunction stm32_usart_rx_dma_start_or_resumefunction stm32_usart_tx_dma_terminatefunction stm32_usart_tx_dma_startedfunction stm32_usart_tx_dma_pausefunction stm32_usart_tx_dma_resumefunction stm32_usart_tx_dma_completefunction stm32_usart_tx_interrupt_enablefunction stm32_usart_tc_interrupt_enablefunction stm32_usart_tx_interrupt_disablefunction stm32_usart_tc_interrupt_disablefunction stm32_usart_transmit_chars_piofunction stm32_usart_transmit_chars_dmafunction stm32_usart_transmit_charsfunction stm32_usart_interruptfunction stm32_usart_set_mctrlfunction stm32_usart_get_mctrlfunction stm32_usart_enable_msfunction stm32_usart_disable_msfunction stm32_usart_stop_txfunction stm32_usart_start_txfunction stm32_usart_flush_bufferfunction stm32_usart_throttlefunction stm32_usart_unthrottlefunction stm32_usart_stop_rxfunction stm32_usart_break_ctlfunction stm32_usart_startupfunction stm32_usart_shutdown
Annotated Snippet
module_init(stm32_usart_init);
module_exit(stm32_usart_exit);
MODULE_ALIAS("platform:" DRIVER_NAME);
MODULE_DESCRIPTION("STMicroelectronics STM32 serial port driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/clk.h`, `linux/console.h`, `linux/delay.h`, `linux/dma-direction.h`, `linux/dmaengine.h`, `linux/dma-mapping.h`, `linux/io.h`.
- Detected declarations: `struct stm32_usart_thresh_ratio`, `function stm32_usart_set_bits`, `function stm32_usart_clr_bits`, `function stm32_usart_tx_empty`, `function stm32_usart_rs485_rts_enable`, `function stm32_usart_rs485_rts_disable`, `function stm32_usart_config_reg_rs485`, `function stm32_usart_config_rs485`, `function stm32_usart_init_rs485`, `function stm32_usart_rx_dma_started`.
- 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.