drivers/comedi/drivers/8255.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/8255.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/8255.c- Extension
.c- Size
- 3440 bytes
- Lines
- 125
- 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
function dev_8255_attachfunction dev_8255_detach
Annotated Snippet
if (ret) {
/*
* Release the I/O port region here, as the
* "detach" handler cannot find it.
*/
release_region(iobase, I8255_SIZE);
s->type = COMEDI_SUBD_UNUSED;
return ret;
}
}
return 0;
}
static void dev_8255_detach(struct comedi_device *dev)
{
struct comedi_subdevice *s;
int i;
for (i = 0; i < dev->n_subdevices; i++) {
s = &dev->subdevices[i];
if (s->type != COMEDI_SUBD_UNUSED) {
unsigned long regbase = subdev_8255_regbase(s);
release_region(regbase, I8255_SIZE);
}
}
}
static struct comedi_driver dev_8255_driver = {
.driver_name = "8255",
.module = THIS_MODULE,
.attach = dev_8255_attach,
.detach = dev_8255_detach,
};
module_comedi_driver(dev_8255_driver);
MODULE_AUTHOR("Comedi https://www.comedi.org");
MODULE_DESCRIPTION("Comedi driver for standalone 8255 devices");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/comedi/comedidev.h`, `linux/comedi/comedi_8255.h`.
- Detected declarations: `function dev_8255_attach`, `function dev_8255_detach`.
- 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.