comedi_check_request_region(9)
β¨ comedi_check_request_region(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is a lil function called comedi_check_request_region β yes the whole name, it's a mouthful, we love her anyway π
πΈ NAME πΈ
comedi_check_request_region β request an I/O region for a legacy driver. that's it, that's the vibe π
π¦ SYNOPSIS π¦
int comedi_check_request_region (struct comedi_device *dev , unsigned
long start , unsigned long len , unsigned long minstart , unsigned long
maxend , unsigned long minalign );
π ARGUMENTS π
devβ the COMEDI device. the main character, honestly πstartβ base address of the I/O region. where the region starts, no cap.lenβ length of the I/O region. how much of it there is, fr fr.minstartβ minimum allowed start address of region. the floor, the boundary, the "don't go below this" energy π§maxendβ maximum allowed region end address of region. the ceiling bestie, the absolute limit.minalignβ required alignment for base address. everything's gotta line up perfectly, like β¨ symmetry β¨
π DESCRIPTION π
so what she does: she requests the specified I/O port region, and the region has a whole checklist to pass π it must start at a non-zero address, it must fall within the specified bounds, and it must be correctly aligned. three rules, no exceptions, periodt.
on success, dev->iobase gets set to the base address of the region and dev->iolen gets set to its length. slay π
returns 0 on success, -EINVAL if start is 0, or -EIO if the request fails. like, if it doesn't work out it will literally tell you why π«Ά
π SEE ALSO π
kernel file ./drivers/comedi/drivers.c β go read her, iykyk π and the whole friend group:
comedi_set_hw_dev(9)comedi_alloc_devpriv(9)comedi_alloc_subdevices(9)comedi_alloc_subdev_readback(9)comedi_readback_insn_read(9)comedi_timeout(9)comedi_dio_insn_config(9)comedi_dio_update_state(9)comedi_bytes_per_scan_cmd(9)comedi_bytes_per_scan(9)comedi_nscans_left(9)comedi_nsamples_left(9)comedi_inc_scan_progress(9)comedi_handle_events(9)comedi_load_firmware(9)__comedi_check_request_region(9)comedi_legacy_detach(9)comedi_auto_config(9)comedi_auto_unconfig(9)comedi_driver_register(9)comedi_driver_unregister(9)
lowkey the funniest part is that __comedi_check_request_region(9) exists too β the one with the underscores, the blueprint if you will. no notes π
that's the whole page bestie, go request some regions responsibly π this lil manual lives at ./drivers/comedi, stamped October 2026, and she answers to comedi_check_request_region(9) πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms