pcie_encode_t_power_on(9)
π 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β theT_POWER_ONtime, in microseconds. Yes, microseconds. Read the unit, bestie, it's literally in the name. πscaleβ where the encodedT_POWER_ONScale gets written. Valid range is0..2, so like, keep it in that lane fr fr.valueβ where the encodedT_POWER_ONValue 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: 2us1: 10us2: 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 β
- Kernel file
./drivers/pci/pcie/aspm.c pci_disable_link_state(9)pci_enable_link_state(9)pci_enable_link_state_locked(9)pcie_aspm_enabled(9)
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
- 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