drivers/usb/serial/ti_usb_3410_5052.c
Source file repositories/reference/linux-study-clean/drivers/usb/serial/ti_usb_3410_5052.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/serial/ti_usb_3410_5052.c- Extension
.c- Size
- 44525 bytes
- Lines
- 1662
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/kernel.hlinux/errno.hlinux/firmware.hlinux/slab.hlinux/tty.hlinux/tty_driver.hlinux/tty_flip.hlinux/module.hlinux/spinlock.hlinux/ioctl.hlinux/serial.hlinux/kfifo.hlinux/mutex.hlinux/uaccess.hlinux/usb.hlinux/usb/serial.h
Detected Declarations
struct ti_uart_configstruct ti_port_statusstruct ti_write_data_bytesstruct ti_read_data_requeststruct ti_read_data_bytesstruct ti_interruptstruct ti_firmware_headerstruct ti_portstruct ti_devicefunction ti_startupfunction ti_releasefunction ti_port_probefunction ti_port_removefunction ti_openfunction ti_closefunction ti_writefunction ti_write_roomfunction ti_chars_in_bufferfunction ti_tx_emptyfunction ti_throttlefunction ti_unthrottlefunction ti_set_termiosfunction ti_tiocmgetfunction ti_tiocmsetfunction ti_breakfunction ti_get_port_from_codefunction ti_get_func_from_codefunction ti_interrupt_callbackfunction ti_bulk_in_callbackfunction ti_bulk_out_callbackfunction ti_recvfunction ti_sendfunction ti_set_mcrfunction ti_get_lsrfunction ti_get_serial_infofunction ti_handle_new_msrfunction ti_stop_readfunction ti_restart_readfunction ti_command_out_syncfunction ti_command_in_syncfunction ti_port_cmd_outfunction ti_port_cmd_infunction ti_write_bytefunction ti_do_downloadfunction ti_download_firmware
Annotated Snippet
struct ti_uart_config {
__be16 wBaudRate;
__be16 wFlags;
u8 bDataBits;
u8 bParity;
u8 bStopBits;
char cXon;
char cXoff;
u8 bUartMode;
};
/* Get port status */
struct ti_port_status {
u8 bCmdCode;
u8 bModuleId;
u8 bErrorCode;
u8 bMSR;
u8 bLSR;
};
/* Purge modes */
#define TI_PURGE_OUTPUT 0x00
#define TI_PURGE_INPUT 0x80
/* Read/Write data */
#define TI_RW_DATA_ADDR_SFR 0x10
#define TI_RW_DATA_ADDR_IDATA 0x20
#define TI_RW_DATA_ADDR_XDATA 0x30
#define TI_RW_DATA_ADDR_CODE 0x40
#define TI_RW_DATA_ADDR_GPIO 0x50
#define TI_RW_DATA_ADDR_I2C 0x60
#define TI_RW_DATA_ADDR_FLASH 0x70
#define TI_RW_DATA_ADDR_DSP 0x80
#define TI_RW_DATA_UNSPECIFIED 0x00
#define TI_RW_DATA_BYTE 0x01
#define TI_RW_DATA_WORD 0x02
#define TI_RW_DATA_DOUBLE_WORD 0x04
struct ti_write_data_bytes {
u8 bAddrType;
u8 bDataType;
u8 bDataCounter;
__be16 wBaseAddrHi;
__be16 wBaseAddrLo;
u8 bData[];
} __packed;
struct ti_read_data_request {
u8 bAddrType;
u8 bDataType;
u8 bDataCounter;
__be16 wBaseAddrHi;
__be16 wBaseAddrLo;
} __packed;
struct ti_read_data_bytes {
u8 bCmdCode;
u8 bModuleId;
u8 bErrorCode;
u8 bData[];
};
/* Interrupt struct */
struct ti_interrupt {
u8 bICode;
u8 bIInfo;
};
/* Interrupt codes */
#define TI_CODE_HARDWARE_ERROR 0xFF
#define TI_CODE_DATA_ERROR 0x03
#define TI_CODE_MODEM_STATUS 0x04
/* Download firmware max packet size */
#define TI_DOWNLOAD_MAX_PACKET_SIZE 64
/* Firmware image header */
struct ti_firmware_header {
__le16 wLength;
u8 bCheckSum;
} __packed;
/* UART addresses */
#define TI_UART1_BASE_ADDR 0xFFA0 /* UART 1 base address */
#define TI_UART2_BASE_ADDR 0xFFB0 /* UART 2 base address */
#define TI_UART_OFFSET_LCR 0x0002 /* UART MCR register offset */
#define TI_UART_OFFSET_MCR 0x0004 /* UART MCR register offset */
#define TI_DRIVER_AUTHOR "Al Borchers <alborchers@steinerpoint.com>"
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/firmware.h`, `linux/slab.h`, `linux/tty.h`, `linux/tty_driver.h`, `linux/tty_flip.h`, `linux/module.h`.
- Detected declarations: `struct ti_uart_config`, `struct ti_port_status`, `struct ti_write_data_bytes`, `struct ti_read_data_request`, `struct ti_read_data_bytes`, `struct ti_interrupt`, `struct ti_firmware_header`, `struct ti_port`, `struct ti_device`, `function ti_startup`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source 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.