pci_pwrctrl_create_devices(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_pwrctrl_create_devices(9)

okay bestie so this is a page straight out of the Kernel API Manual, and it's lowkey about building device tree stuff for PCI power control. stay with me, it's actually slay once you get it ✨


πŸŽ€ NAME πŸŽ€

pci_pwrctrl_create_devices β€” the function that creates pwrctrl devices. that's it, that's the vibe πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int pci_pwrctrl_create_devices (struct device *parent );

literally the whole signature, no cap.


🌸 ARGUMENTS 🌸

  • parent β€” the PCI host controller device πŸ‘‘ like, the parent of everything we're about to build, iykyk

✨ DESCRIPTION ✨

okay so this one recursively creates pwrctrl devices for the devicetree hierarchy sitting below the PCI host controller you pass in β€” and when we say recursively, we mean it does it in a depth first manner, going down and down and down before coming back up. very main character energy 🌈

and bestie listen β€” on error, all the created devices will be destroyed. everything we just made? gone. accountability, periodt 😭

πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” we ate πŸ‘‘
  • a negative error number on error β€” not the vibe πŸ’€

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/pci/pwrctrl/core.c plus the whole bestie lineup:


🫢 that's the page!! this little gem lives in ./drivers/pci/pwrctrl and it's dated October 2026 β€” go forth and create devices responsibly, bestie πŸ’…β­πŸ’–

πŸ“¦ where this page comes from