pcie_encode_t_power_on(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pcie_encode_t_power_on(9) β€” from the Kernel API Manual, bestie ✨

Okay so sit down, grab a strawberry πŸ“, because we're about to get into pcie_encode_t_power_on, which lives in the Kernel API Manual and is honestly such a little icon. It does exactly one thing and it does it flawlessly. Main character energy, no notes. πŸ‘‘


🌸 NAME 🌸

pcie_encode_t_power_on β€” the girl whose whole job is encoding T_POWER_ON into the scale and value fields. That's it. That's the gig. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void pcie_encode_t_power_on (u32 t_power_on_us , u8 *scale , u8 *value
);

Like, look at her. Three args, returns nothing, absolutely unbothered. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • t_power_on_us β€” the T_POWER_ON time, in microseconds. Yes, microseconds. Read the unit, bestie, it's literally in the name. πŸ™ˆ
  • scale β€” where the encoded T_POWER_ON Scale gets written. Valid range is 0..2, so like, keep it in that lane fr fr.
  • value β€” where the encoded T_POWER_ON Value goes. 🫢

πŸ’– DESCRIPTION πŸ’–

So here's the whole vibe β€” T_POWER_ON is encoded like this:

T_POWER_ON(us) = scale_unit(us) * value

And scale_unit is picked by... you guessed it, scale. The mapping is giving very much:

  • 0: 2us
  • 1: 10us
  • 2: 100us

Now, if t_power_on_us exceeds the maximum representable value, the result gets clamped to the largest encodable T_POWER_ON. Not an error, not a crash β€” just clamped. She's keeping it cute and staying in range. 😌

Receipts required: see PCIe r7.0, sec 7.8.3.2. Like, that's the source, iykyk. πŸ“š

⭐ SEE ALSO ⭐

Go read the whole friend group, they're all linked and they all ate. πŸ”₯


Okay bye bestie!! 🧚 This little baddie lives over in ./drivers/pci/pcie, dated October 2026 β€” so like, future iconic πŸ’€βœ¨, and it's pcie_encode_t_power_on(9) forever and always. Periodt. πŸ’œ

πŸ“¦ where this page comes from