usb_power_de..._link_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 🌈


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