mirror-linux/include/linux/comedi
Ian Abbott 241cb8dee0 comedi: add comedi_check_request_region()
There is an existing comedi_request_region(dev, start, len) function
used by COMEDI drivers for legacy devices to request an I/O port region
starting at a specified base address (which must be non-zero) and with a
specified length.  It uses request_region().  On success, it sets
dev->iobase and dev->iolen and returns 0.  There is a alternative
function __comedi_request_region(dev, start, len) which does the same
thing without setting dev->iobase and dev->iolen.

Most hardware devices have restrictions on the allowed I/O port base
address and alignment, so add new functions
comedi_check_request_region(dev, start, len, minstart, maxend, minalign)
and __comedi_check_request_region(dev, start, len, minstart, maxend,
minalign) to perform these additional checks.  Turn the original
functions into static inline wrapper functions that call the new
functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260130170416.49994-2-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-04-02 15:49:36 +02:00
..
comedi_8254.h comedi: comedi_8254: correct kernel-doc warnings 2026-01-16 16:33:17 +01:00
comedi_8255.h comedi: comedi_8255: Conditionally remove I/O port support 2023-10-05 13:34:04 +02:00
comedi_isadma.h
comedi_pci.h
comedi_pcmcia.h
comedi_usb.h
comedidev.h comedi: add comedi_check_request_region() 2026-04-02 15:49:36 +02:00
comedilib.h comedi: kcomedilib: Add loop checking variants of open and close 2025-11-26 14:20:10 +01:00