drivers/gpib/tnt4882/tnt4882_gpib.c
Source file repositories/reference/linux-study-clean/drivers/gpib/tnt4882/tnt4882_gpib.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpib/tnt4882/tnt4882_gpib.c- Extension
.c- Size
- 53994 bytes
- Lines
- 1841
- Domain
- Driver Families
- Bucket
- drivers/gpib
- 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/ioport.hlinux/sched.hlinux/module.hlinux/slab.hlinux/pci.hlinux/pci_ids.hlinux/string.hlinux/init.hlinux/delay.hlinux/isapnp.hnec7210.hgpibP.hmite.htnt4882_registers.hlinux/kernel.hlinux/moduleparam.hlinux/ptrace.hlinux/timer.hlinux/io.hpcmcia/cistpl.hpcmcia/cisreg.hpcmcia/ds.h
Detected Declarations
struct tnt4882_privstruct local_info_tfunction tnt_paged_readbfunction tnt_paged_writebfunction tnt_readbfunction tnt_writebfunction tnt4882_line_statusfunction tnt4882_t1_delayfunction fifo_word_availablefunction fifo_byte_availablefunction fifo_xfer_donefunction drain_fifo_wordsfunction tnt4882_release_holdofffunction tnt4882_accel_readfunction fifo_space_availablefunction tnt_transfer_countfunction write_waitfunction generic_writefunction tnt4882_accel_writefunction tnt4882_commandfunction tnt4882_internal_interruptfunction tnt4882_interruptfunction tnt4882_readfunction tnt4882_writefunction tnt4882_command_unaccelfunction tnt4882_take_controlfunction tnt4882_go_to_standbyfunction tnt4882_request_system_controlfunction tnt4882_interface_clearfunction tnt4882_remote_enablefunction tnt4882_enable_eosfunction tnt4882_disable_eosfunction tnt4882_update_statusfunction tnt4882_primary_addressfunction tnt4882_secondary_addressfunction tnt4882_parallel_pollfunction tnt4882_parallel_poll_configurefunction tnt4882_parallel_poll_responsefunction tnt4882_serial_poll_responsefunction tnt4882_serial_poll_response2function tnt4882_serial_poll_statusfunction tnt4882_return_to_localfunction tnt4882_board_resetfunction tnt4882_allocate_privatefunction tnt4882_free_privatefunction tnt4882_initfunction ni_pci_attachfunction ni_pci_detach
Annotated Snippet
static struct pci_driver tnt4882_pci_driver = {
.name = DRV_NAME,
.id_table = tnt4882_pci_table,
.probe = &tnt4882_pci_probe
};
#if 0
/* unused, will be needed when the driver is turned into a pnp_driver */
static const struct pnp_device_id tnt4882_pnp_table[] = {
{.id = "NICC601"},
{.id = ""}
};
MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);
#endif
#ifdef CONFIG_GPIB_PCMCIA
static struct gpib_interface ni_pcmcia_interface;
static struct gpib_interface ni_pcmcia_accel_interface;
static int __init init_ni_gpib_cs(void);
static void __exit exit_ni_gpib_cs(void);
#endif
static int __init tnt4882_init_module(void)
{
int result;
result = pci_register_driver(&tnt4882_pci_driver);
if (result) {
pr_err("pci_register_driver failed: error = %d\n", result);
return result;
}
result = gpib_register_driver(&ni_isa_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_isa;
}
result = gpib_register_driver(&ni_isa_accel_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_isa_accel;
}
result = gpib_register_driver(&ni_nat4882_isa_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_nat4882_isa;
}
result = gpib_register_driver(&ni_nat4882_isa_accel_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_nat4882_isa_accel;
}
result = gpib_register_driver(&ni_nec_isa_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_nec_isa;
}
result = gpib_register_driver(&ni_nec_isa_accel_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_nec_isa_accel;
}
result = gpib_register_driver(&ni_pci_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_pci;
}
result = gpib_register_driver(&ni_pci_accel_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_pci_accel;
}
#ifdef CONFIG_GPIB_PCMCIA
result = gpib_register_driver(&ni_pcmcia_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
goto err_pcmcia;
}
result = gpib_register_driver(&ni_pcmcia_accel_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
Annotation
- Immediate include surface: `linux/ioport.h`, `linux/sched.h`, `linux/module.h`, `linux/slab.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/string.h`, `linux/init.h`.
- Detected declarations: `struct tnt4882_priv`, `struct local_info_t`, `function tnt_paged_readb`, `function tnt_paged_writeb`, `function tnt_readb`, `function tnt_writeb`, `function tnt4882_line_status`, `function tnt4882_t1_delay`, `function fifo_word_available`, `function fifo_byte_available`.
- Atlas domain: Driver Families / drivers/gpib.
- 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.