of_pci_get_devfn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_pci_get_devfn(9) πŸ’–

okay so welcome to the Kernel API Manual, bestie β€” this is the page for of_pci_get_devfn(9), and it's literally here to help you get device and function numbers for a device node. slay. ✨


🌸 NAME 🌸

of_pci_get_devfn β€” get device and function numbers for a device node πŸŽ€


✨ SYNOPSIS ✨

int of_pci_get_devfn (struct device_node *np );

πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” device node. like, the node you're interrogating πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this function parses a standard 5-cell PCI resource and returns an 8-bit value. that value can then be passed to the PCI_SLOT and PCI_FUNC macros to extract the device and function numbers respectively. iconic behavior, honestly. πŸ’–

and if something goes wrong? on error, a negative error code is returned. no cap. 😭


🌈 SEE ALSO 🌈

Kernel file ./drivers/pci/of.c, plus the whole friend group:


and that's the whole vibe, bestie 🫢 this page comes from ./drivers/pci, dated October 2026, and it's living in the Kernel API Manual β€” of_pci_get_devfn(9) signing off πŸ’œ

πŸ“¦ where this page comes from