pci_pwrctrl_create_devices(9)
π 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 π₯
0on 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:
pci_pwrctrl_init(9)pci_pwrctrl_device_set_ready(9)pci_pwrctrl_device_unset_ready(9)devm_pci_pwrctrl_device_set_ready(9)pci_pwrctrl_power_off_devices(9)pci_pwrctrl_power_on_devices(9)pci_pwrctrl_destroy_devices(9)
π«Ά 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
- 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