STRUCT UIO_INFO(9)
π¦ struct uio_info(9) β like, the whole vibe of a UIO device, bestie π¦
okay so this is from the Kernel API Manual, and it's literally the cheat sheet for struct uio_info β the thing that tells the kernel everything your UIO device can do β¨ no cap, this is the main character struct.
π NAME π
struct uio_info β UIO device capabilities π«Ά
likeβ¦ it's the capabilities list. for a UIO device. that's the whole assignment π
πΈ SYNOPSIS πΈ
here's the struct in all its glory, typed out exactly, don't @ me:
struct uio_info {
struct uio_device *uio_dev;
const char *name;
const char *version;
struct uio_mem mem[MAX_UIO_MAPS];
struct uio_port port[MAX_UIO_PORT_REGIONS];
long irq;
unsigned long irq_flags;
void *priv;
irqreturn_t (*handler)(int irq, struct uio_info *dev_info);
int (*mmap_prepare)(struct uio_info *info, struct vm_area_desc *desc);
int (*open)(struct uio_info *info, struct inode *inode);
int (*release)(struct uio_info *info, struct inode *inode);
int (*irqcontrol)(struct uio_info *info, s32 irq_on);
};
π Members π
bestie, let's go field by field, one by one, no skipping (I would never) π
uio_devβ the UIO device this info belongs to π like, whose info even is thisnameβ device name β¨ give it a cute oneversionβ device driver version π₯memβ list of mappable memory regions, andsize==0means end of list π§ (the list justβ¦ stops, iconic)portβ list of port regions,size==0for end of list π same dealirqβ interrupt number, orUIO_IRQ_CUSTOMβirq_flagsβ flags forrequest_irqπ«privβ optional private data π optional!! it's giving low-maintenancehandlerβ the device's irq handler π the one actually doing the workmmap_prepareβ mmap_prepare operation for this uio device πopenβ open operation for this uio device πreleaseβ release operation for this uio device π¦irqcontrolβ disable/enable irqs when0/1is written to/dev/uioXπ― (yes, that's the whole trigger,0or1, periodt)
π SEE ALSO π
go read these next, iykyk π
Kernel file ./include/linux/uio_driver.h, plus struct uio_mem(9), struct uio_port(9), uio_register_device(9), devm_uio_register_device(9) π
okay that's the whole page, bestie π huge slay. this one lives in ./include/linux, stamped October 2026, and it goes by struct uio_info(9) β go forth and register your devices π«Άβ¨π
π¦ 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