of_pci_get_devfn(9)
π 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:
pci_set_of_node(9)of_pci_parse_bus_range(9)of_get_pci_domain_nr(9)of_pci_preserve_config(9)of_pci_check_probe_only(9)devm_of_pci_get_host_bridge_resources(9)of_irq_parse_pci(9)of_irq_parse_and_map_pci(9)of_pci_supply_present(9)of_pci_get_max_link_speed(9)of_pci_get_slot_power_limit(9)of_pci_get_equalization_presets(9)
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
- 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