drivers/tty/serial/icom.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/icom.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/icom.c- Extension
.c- Size
- 51370 bytes
- Lines
- 1864
- Domain
- Driver Families
- Bucket
- drivers/tty
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/module.hlinux/kernel.hlinux/errno.hlinux/signal.hlinux/timer.hlinux/interrupt.hlinux/tty.hlinux/termios.hlinux/fs.hlinux/tty_flip.hlinux/serial.hlinux/serial_core.hlinux/serial_reg.hlinux/major.hlinux/string.hlinux/fcntl.hlinux/ptrace.hlinux/ioport.hlinux/mm.hlinux/slab.hlinux/init.hlinux/delay.hlinux/pci.hlinux/vmalloc.hlinux/smp.hlinux/spinlock.hlinux/kref.hlinux/firmware.hlinux/bitops.hlinux/io.hasm/irq.hlinux/uaccess.h
Detected Declarations
struct icom_regsstruct func_dramstruct statusAreastruct xmit_status_areastruct icom_adapterstruct icom_portstruct icom_adapterstruct lookup_proc_tablestruct lookup_int_tablefunction tracefunction tracefunction free_port_memoryfunction get_port_memoryfunction stop_processorfunction start_processorfunction load_codefunction icom_startupfunction icom_shutdownfunction icom_writefunction check_modem_statusfunction xmit_interruptfunction recv_interruptfunction process_interruptfunction icom_interruptfunction icom_tx_emptyfunction icom_set_mctrlfunction icom_get_mctrlfunction icom_stop_txfunction icom_start_txfunction icom_send_xcharfunction icom_stop_rxfunction icom_breakfunction icom_openfunction icom_closefunction icom_set_termiosfunction icom_config_portfunction icom_init_portsfunction icom_port_activefunction icom_load_portsfunction icom_alloc_adapterfunction list_for_each_entryfunction icom_free_adapterfunction icom_kref_releasefunction icom_probefunction icom_removefunction list_for_each_entryfunction icom_initfunction icom_exit
Annotated Snippet
static struct pci_driver icom_pci_driver = {
.name = ICOM_DRIVER_NAME,
.id_table = icom_pci_table,
.probe = icom_probe,
.remove = icom_remove,
};
static int __init icom_init(void)
{
int ret;
ret = uart_register_driver(&icom_uart_driver);
if (ret)
return ret;
ret = pci_register_driver(&icom_pci_driver);
if (ret < 0)
uart_unregister_driver(&icom_uart_driver);
return ret;
}
static void __exit icom_exit(void)
{
pci_unregister_driver(&icom_pci_driver);
uart_unregister_driver(&icom_uart_driver);
}
module_init(icom_init);
module_exit(icom_exit);
MODULE_AUTHOR("Michael Anderson <mjanders@us.ibm.com>");
MODULE_DESCRIPTION("IBM iSeries Serial IOA driver");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("icom_call_setup.bin");
MODULE_FIRMWARE("icom_res_dce.bin");
MODULE_FIRMWARE("icom_asc.bin");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/signal.h`, `linux/timer.h`, `linux/interrupt.h`, `linux/tty.h`, `linux/termios.h`.
- Detected declarations: `struct icom_regs`, `struct func_dram`, `struct statusArea`, `struct xmit_status_area`, `struct icom_adapter`, `struct icom_port`, `struct icom_adapter`, `struct lookup_proc_table`, `struct lookup_int_table`, `function trace`.
- Atlas domain: Driver Families / drivers/tty.
- Implementation status: pattern 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.