drivers/comedi/drivers/pcl724.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/pcl724.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/pcl724.c- Extension
.c- Size
- 4048 bytes
- Lines
- 173
- Domain
- Driver Families
- Bucket
- drivers/comedi
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/comedi/comedidev.hlinux/comedi/comedi_8255.h
Detected Declarations
struct pcl724_boardfunction pcl724_8255mapped_iofunction pcl724_attach
Annotated Snippet
struct pcl724_board {
const char *name;
unsigned int io_range;
unsigned int min_io_start;
unsigned int max_io_end;
unsigned int can_have96:1;
unsigned int is_pet48:1;
int numofports;
};
static const struct pcl724_board boardtypes[] = {
{
.name = "pcl724",
.io_range = 0x04,
.min_io_start = 0x200,
.max_io_end = 0x3ff,
.numofports = 1, /* 24 DIO channels */
}, {
.name = "pcl722",
.io_range = 0x20,
.min_io_start = 0x200,
.max_io_end = 0x3ff,
.can_have96 = 1,
.numofports = 6, /* 144 (or 96) DIO channels */
}, {
.name = "pcl731",
.io_range = 0x08,
.min_io_start = 0,
.max_io_end = 0x3ff,
.numofports = 2, /* 48 DIO channels */
}, {
.name = "acl7122",
.io_range = 0x20,
.min_io_start = 0x200,
.max_io_end = 0x3ff,
.can_have96 = 1,
.numofports = 6, /* 144 (or 96) DIO channels */
}, {
.name = "acl7124",
.io_range = 0x04,
.min_io_start = 0x200,
.max_io_end = 0x3ff,
.numofports = 1, /* 24 DIO channels */
}, {
.name = "pet48dio",
.io_range = 0x02,
.min_io_start = 0,
.max_io_end = 0x3ff,
.is_pet48 = 1,
.numofports = 2, /* 48 DIO channels */
}, {
.name = "pcmio48",
.io_range = 0x08,
.min_io_start = 0x100,
.max_io_end = 0x17f,
.numofports = 2, /* 48 DIO channels */
}, {
.name = "onyx-mm-dio",
.io_range = 0x10,
.min_io_start = 0,
.max_io_end = 0x3ff,
.numofports = 2, /* 48 DIO channels */
},
};
static int pcl724_8255mapped_io(struct comedi_device *dev,
int dir, int port, int data,
unsigned long iobase)
{
int movport = I8255_SIZE * (iobase >> 12);
iobase &= 0x0fff;
outb(port + movport, iobase);
if (dir) {
outb(data, iobase + 1);
return 0;
}
return inb(iobase + 1);
}
static int pcl724_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct pcl724_board *board = dev->board_ptr;
struct comedi_subdevice *s;
unsigned long iobase;
unsigned int iorange;
int n_subdevices;
int ret;
Annotation
- Immediate include surface: `linux/module.h`, `linux/comedi/comedidev.h`, `linux/comedi/comedi_8255.h`.
- Detected declarations: `struct pcl724_board`, `function pcl724_8255mapped_io`, `function pcl724_attach`.
- Atlas domain: Driver Families / drivers/comedi.
- Implementation status: source implementation candidate.
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.