drivers/tty/serial/max310x.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/max310x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/max310x.c- Extension
.c- Size
- 49040 bytes
- Lines
- 1747
- 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.
- 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/bitops.hlinux/clk.hlinux/delay.hlinux/device.hlinux/gpio/driver.hlinux/i2c.hlinux/module.hlinux/mod_devicetable.hlinux/property.hlinux/regmap.hlinux/serial_core.hlinux/serial.hlinux/tty.hlinux/tty_flip.hlinux/spi/spi.hlinux/uaccess.h
Detected Declarations
struct max310x_if_cfgstruct max310x_devtypestruct max310x_onestruct max310x_portfunction max310x_port_readfunction max310x_port_writefunction max310x_port_updatefunction max310x_detectfunction max310x_powerfunction max310x_reg_writeablefunction max310x_reg_volatilefunction max310x_reg_preciousfunction max310x_reg_noincfunction max310x_set_baudfunction max310x_update_best_errfunction max310x_set_ref_clkfunction max310x_batch_writefunction max310x_batch_readfunction max310x_handle_rxfunction max310x_handle_txfunction max310x_start_txfunction max310x_port_irqfunction max310x_istfunction for_each_clear_bitfunction max310x_tx_procfunction max310x_tx_emptyfunction max310x_get_mctrlfunction max310x_md_procfunction max310x_set_mctrlfunction max310x_break_ctlfunction max310x_set_termiosfunction max310x_rs_procfunction max310x_rs485_configfunction max310x_startupfunction max310x_shutdownfunction max310x_request_portfunction max310x_config_portfunction max310x_verify_portfunction max310x_null_voidfunction max310x_suspendfunction max310x_resumefunction max310x_gpio_getfunction max310x_gpio_setfunction max310x_gpio_direction_inputfunction max310x_gpio_direction_outputfunction max310x_gpio_set_configfunction max310x_probefunction max310x_remove
Annotated Snippet
module_init(max310x_uart_init);
static void __exit max310x_uart_exit(void)
{
#ifdef CONFIG_I2C
i2c_del_driver(&max310x_i2c_driver);
#endif
#ifdef CONFIG_SPI_MASTER
spi_unregister_driver(&max310x_spi_driver);
#endif
uart_unregister_driver(&max310x_uart);
}
module_exit(max310x_uart_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");
MODULE_DESCRIPTION("MAX310X serial driver");
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/clk.h`, `linux/delay.h`, `linux/device.h`, `linux/gpio/driver.h`, `linux/i2c.h`, `linux/module.h`, `linux/mod_devicetable.h`.
- Detected declarations: `struct max310x_if_cfg`, `struct max310x_devtype`, `struct max310x_one`, `struct max310x_port`, `function max310x_port_read`, `function max310x_port_write`, `function max310x_port_update`, `function max310x_detect`, `function max310x_power`, `function max310x_reg_writeable`.
- Atlas domain: Driver Families / drivers/tty.
- Implementation status: integration 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.