of_pci_get_slot_power_limit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_pci_get_slot_power_limit(9) β€” Kernel API Manual energy ✨

okay so bestie, welcome to the Kernel API Manual entry for of_pci_get_slot_power_limit(9) β€” yes the whole thing, no skips, we are doing this properly 🫢


🌸 NAME 🌸

of_pci_get_slot_power_limit β€” literally just parses the "slot-power-limit-milliwatt" property πŸ’– that's the whole vibe, no cap.


✨ SYNOPSIS ✨

u32 of_pci_get_slot_power_limit (struct device_node *node , u8
*slot_power_limit_value , u8 *slot_power_limit_scale );

yep that's the whole signature, look at her go πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” the device tree node that's holding the slot power limit info. this is the main character of the call fr fr 🌈
  • slot_power_limit_value β€” a pointer to where the value should get stored, in PCIe Slot Capabilities Register format. so like, that exact format, not whatever format, okay? 😭
  • slot_power_limit_scale β€” same deal but for the scale β€” pointer to where the scale goes, also in PCIe Slot Capabilities Register format πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does she actually do? She returns the slot power limit in milliwatts ⚑ and if the slot_power_limit_value and slot_power_limit_scale pointers are non-NULL, she fills in the value and the scale using the format that the PCIe Slot Capabilities Register uses. iykyk 🧚

and if the property is not found or is invalid? she returns 0. that's it. nothing dramatic, just a cool zero 😌

πŸ’œ SEE ALSO πŸ’œ

the Kernel file ./drivers/pci/of.c is right here bestie, plus the whole friend group 🫢:


and that's the page!! πŸŽ€ sign-off time: this lil slice of lore lives in ./drivers/pci, dated October 2026, and the header is of_pci_get_slot_power_limit(9) in case you forgot already πŸ™ˆ β€” go read the source, slay, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from