comedi_pci_auto_config(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is the <pink>comedi_pci_auto_config(9)</pink> page from the Kernel API Manual, and it's all about <rainbow>comedi_pci_auto_config</rainbow> β€” Configure/probe a PCI COMEDI device βœ¨πŸ’…


✨ SYNOPSIS ✨

       int comedi_pci_auto_config (struct pci_dev *pcidev , struct
       comedi_driver *driver , unsigned long context );

That signature is giving very much kernel-core, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • pcidev β€” PCI device. πŸ–₯οΈπŸ’–
  • driver β€” Registered COMEDI driver. πŸ‘‘
  • context β€” Driver specific data, passed to comedi_auto_config. 🧺

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this is typically called from the pci_driver (*probe) function. 🫑 It auto-configures a COMEDI device, using the struct device embedded in *pcidev as the hardware device.

The context value gets passed through to the driver's "auto_attach" handler. That "auto_attach" handler may call comedi_to_pci_dev on the passed in COMEDI device to recover pcidev. literally iconic wiring, iykyk πŸ”₯


πŸ”₯ RETURN πŸ”₯

It returns the result of calling comedi_auto_config β€” 0 on success, or a negative error number on failure 😭. That's the whole vibe check, fr fr.


🌈 SEE ALSO 🌈

Kernel file ./drivers/comedi/comedi_pci.c πŸ‘€


mwah πŸ’‹ this page's cute little sign-off is brought to you by the source/version tag ./drivers/comedi, dated October 2026 β€” stay comedi-fied, bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from