__comedi_ch...quest_region(9)
πΈ __comedi_check_request_region(9) β Kernel API Manual πΈ
okay bestie, welcome to the Kernel API Manual, sit down, hydrate, and let's talk about reserving I/O ports π
β¨ NAME β¨
__comedi_check_request_region β request an I/O region for a legacy driver π
π 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 );
like yes it's a long signature, no we're not scared of it π
π¦ ARGUMENTS π¦
devβ the COMEDI device. your main character struct, the whole reason we're here πstartβ base address of the I/O region. where it all begins β¨lenβ length of the I/O region. how much real estate we're claiming πminstartβ minimum allowed start address of region. the floor, bestie, you cannot go below it πmaxendβ maximum allowed region end address of region. the ceiling, and no, you can't just vibe your way past it πminalignβ required alignment for base address. everything has to line up, it's giving grid aesthetics π
πΈ DESCRIPTION πΈ
So what does this thing do? It requests the specified I/O port region β but not just any region, okay? this one has standards π
The region:
- must start at a non-zero address (zero is not it, zero is the ick)
- must fall within the specified bounds
- must be correctly aligned
and if all of that checks out, the request goes through. slay π«Ά
Returns 0 on success β iconic, we love a zero π
Returns -EINVAL if start is 0 π«
Returns -EIO if the request fails π
heads up bestie:-EINVALis literally the "your start address is zero" error, and-EIOmeans the request itself failed. don't mix them up, iykyk π
β SEE ALSO β
Kernel file ./drivers/comedi/drivers.c, plus 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)
and that's the whole page, bestie π this one lives over in ./drivers/comedi, and it was last touched October 2026 β so go forth, request your I/O regions responsibly, and remember: non-zero start, inside the bounds, correctly aligned. periodt πβ¨π¦
π¦ 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