of_get_pci_domain_nr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, you opened the of_get_pci_domain_nr(9) page from the Kernel API Manual, and honestly? main character energy πŸ’…βœ¨ This one is all about finding the host bridge domain number of a given device node, and the vibe check is: it reads a property and gives you a number or a negative error. No cap.

✨ NAME ✨

of_get_pci_domain_nr β€” find the host bridge domain number of the given device node. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

the signature is literally right here, copy it exactly:

int of_get_pci_domain_nr (struct device_node *node );

πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” device tree node with the domain information. πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

so this function will try to obtain the host bridge domain number by finding a property called linux,pci-domain of the given device node. It's giving detective energy πŸ”βœ¨

it returns the associated domain number from DT in the range [0-0xffff], or a negative value if the required property is not found. periodt πŸ’–

πŸ”₯ RETURN πŸ”₯

the return values are the whole plot, ngl:

  • > 0 β€” on success, an associated domain number. πŸ‘‘
  • -EINVAL β€” the linux,pci-domain property does not exist. 😭
  • -ENODATA β€” the linux,pci-domain" property does not have value.
  • -EOVERFLOW β€” invalid linux,pci-domain property value. πŸ’€

🌈 SEE ALSO 🌈

kernel file ./drivers/pci/of.c is the source spot 🏑, and the whole squad is:


signed off from the ./drivers/pci source/version 🌸, dated October 2026 πŸŽ€ β€” stay iconic, bestie, and may your device tree always vibe πŸ’œ

πŸ“¦ where this page comes from