drivers/gpib/fmh_gpib/fmh_gpib.c
Source file repositories/reference/linux-study-clean/drivers/gpib/fmh_gpib/fmh_gpib.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpib/fmh_gpib/fmh_gpib.c- Extension
.c- Size
- 53237 bytes
- Lines
- 1754
- 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
fmh_gpib.hgpibP.hlinux/delay.hlinux/device.hlinux/dma-mapping.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/slab.h
Detected Declarations
function fmh_gpib_readfunction fmh_gpib_writefunction fmh_gpib_commandfunction fmh_gpib_take_controlfunction fmh_gpib_go_to_standbyfunction fmh_gpib_request_system_controlfunction fmh_gpib_interface_clearfunction fmh_gpib_remote_enablefunction fmh_gpib_enable_eosfunction fmh_gpib_disable_eosfunction fmh_gpib_update_statusfunction fmh_gpib_primary_addressfunction fmh_gpib_secondary_addressfunction fmh_gpib_parallel_pollfunction fmh_gpib_parallel_poll_configurefunction fmh_gpib_parallel_poll_responsefunction fmh_gpib_local_parallel_poll_modefunction fmh_gpib_serial_poll_response2function fmh_gpib_serial_poll_statusfunction fmh_gpib_return_to_localfunction fmh_gpib_line_statusfunction fmh_gpib_t1_delayfunction lacs_or_read_readyfunction wait_for_readfunction wait_for_rx_fifo_half_full_or_endfunction wait_for_data_out_readyfunction fmh_gpib_dma_callbackfunction fmh_gpib_all_bytes_are_sentfunction fmh_gpib_dma_writefunction fmh_gpib_accel_writefunction fmh_gpib_get_dma_residuefunction wait_for_tx_fifo_half_emptyfunction fmh_gpib_fifo_writefunction fmh_gpib_fifo_writefunction fmh_gpib_dma_readfunction fmh_gpib_release_rfd_holdofffunction fmh_gpib_accel_readfunction fmh_gpib_fifo_read_countablefunction fmh_gpib_fifo_readfunction fmh_gpib_internal_interruptfunction fmh_gpib_interruptfunction fmh_gpib_allocate_privatefunction fmh_gpib_generic_detachfunction fmh_gpib_generic_attachfunction fmh_gpib_config_dmafunction fmh_gpib_initfunction fmh_gpib_device_matchfunction fmh_gpib_attach_impl
Annotated Snippet
static struct pci_driver fmh_gpib_pci_driver;
// wrappers for interface functions
static int fmh_gpib_read(struct gpib_board *board, u8 *buffer, size_t length,
int *end, size_t *bytes_read)
{
struct fmh_priv *priv = board->private_data;
return nec7210_read(board, &priv->nec7210_priv, buffer, length, end, bytes_read);
}
static int fmh_gpib_write(struct gpib_board *board, u8 *buffer, size_t length,
int send_eoi, size_t *bytes_written)
{
struct fmh_priv *priv = board->private_data;
return nec7210_write(board, &priv->nec7210_priv, buffer, length, send_eoi, bytes_written);
}
static int fmh_gpib_command(struct gpib_board *board, u8 *buffer, size_t length,
size_t *bytes_written)
{
struct fmh_priv *priv = board->private_data;
return nec7210_command(board, &priv->nec7210_priv, buffer, length, bytes_written);
}
static int fmh_gpib_take_control(struct gpib_board *board, int synchronous)
{
struct fmh_priv *priv = board->private_data;
return nec7210_take_control(board, &priv->nec7210_priv, synchronous);
}
static int fmh_gpib_go_to_standby(struct gpib_board *board)
{
struct fmh_priv *priv = board->private_data;
return nec7210_go_to_standby(board, &priv->nec7210_priv);
}
static int fmh_gpib_request_system_control(struct gpib_board *board, int request_control)
{
struct fmh_priv *priv = board->private_data;
struct nec7210_priv *nec_priv = &priv->nec7210_priv;
return nec7210_request_system_control(board, nec_priv, request_control);
}
static void fmh_gpib_interface_clear(struct gpib_board *board, int assert)
{
struct fmh_priv *priv = board->private_data;
nec7210_interface_clear(board, &priv->nec7210_priv, assert);
}
static void fmh_gpib_remote_enable(struct gpib_board *board, int enable)
{
struct fmh_priv *priv = board->private_data;
nec7210_remote_enable(board, &priv->nec7210_priv, enable);
}
static int fmh_gpib_enable_eos(struct gpib_board *board, u8 eos_byte, int compare_8_bits)
{
struct fmh_priv *priv = board->private_data;
return nec7210_enable_eos(board, &priv->nec7210_priv, eos_byte, compare_8_bits);
}
static void fmh_gpib_disable_eos(struct gpib_board *board)
{
struct fmh_priv *priv = board->private_data;
nec7210_disable_eos(board, &priv->nec7210_priv);
}
static unsigned int fmh_gpib_update_status(struct gpib_board *board, unsigned int clear_mask)
{
struct fmh_priv *priv = board->private_data;
return nec7210_update_status(board, &priv->nec7210_priv, clear_mask);
}
static int fmh_gpib_primary_address(struct gpib_board *board, unsigned int address)
{
struct fmh_priv *priv = board->private_data;
return nec7210_primary_address(board, &priv->nec7210_priv, address);
}
Annotation
- Immediate include surface: `fmh_gpib.h`, `gpibP.h`, `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`.
- Detected declarations: `function fmh_gpib_read`, `function fmh_gpib_write`, `function fmh_gpib_command`, `function fmh_gpib_take_control`, `function fmh_gpib_go_to_standby`, `function fmh_gpib_request_system_control`, `function fmh_gpib_interface_clear`, `function fmh_gpib_remote_enable`, `function fmh_gpib_enable_eos`, `function fmh_gpib_disable_eos`.
- 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.