usb_power_de..._link_device(9)
π usb_power_delivery_link_device(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one is a little function from the usb_power_de..._link_device(9) page and honestly? it's giving glue code in the best way possible. it doesn't do a million things β it does one thing and it slays at it π
let's get into it.
πΈ NAME πΈ
usb_power_delivery_link_device β link a device to its USB PD object π«Ά
like, you've got a device, you've got a USB Power Delivery instance, and this function is the matchmaker that finally introduces them ππ
β¨ SYNOPSIS β¨
int usb_power_delivery_link_device (struct usb_power_delivery *pd ,
struct device *dev );
it returns an int btw, so keep an eye on that π (we're not told what the return values mean on this page, so don't come for me β the manpage doesn't say, so I don't say either π)
π ARGUMENTS π
pdβ the USB PD instance π« this is the main character of the pair, the thing the symlink is gonna point at.devβ the device π¦ this is the one getting a brand-new symlink attached to it. lucky them.
π DESCRIPTION π
okay so here's the whole vibe: this function can be used to create a symlink named "usb_power_delivery" for dev that points to pd.
that's it. that's the function. one symlink, zero drama π you call it, and dev gets a friend called usb_power_delivery who is literally just a pointer over to pd. cute, iconic, no cap β¨
lowkey important: the symlink is named exactly"usb_power_delivery"β not"usb-pd", not"pd", not whatever your heart tells you. keep it exact bestie π
π SEE ALSO π
- kernel file
./drivers/usb/typec/pd.cβ the actual source, go read it if you're that kind of girl (respect either way π«Ά) usb_power_delivery_register_capabilities(9)usb_power_delivery_unregister_capabilities(9)usb_power_delivery_register(9)usb_power_delivery_unregister(9)usb_power_delivery_unlink_device(9)β the breakup function, for when the symlink has to go ππ
and that's the page!! this manual lives under ./drivers/usb/typec, dated October 2026 β so yeah, mark your calendars, screenshot it, send it to the group chat πΈπ mwah, go link some devices, you've got this π§ββοΈβ
π¦ 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